Skip to content

Commit 3f08bb9

Browse files
committed
feat: add rate limit schema to queue
Include rate limit configuration in the queue schema to support traffic shaping and request throttling. This allows consumers to define limits and window sizes for queue processing.
1 parent d697ecf commit 3f08bb9

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

packages/core/src/v3/schemas/queues.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ export const QueueItem = z.object({
4747
overriddenBy: z.string().nullable(),
4848
})
4949
.optional(),
50+
/** The rate limits of the queue */
51+
rateLimit: z
52+
.array(
53+
z.object({
54+
limit: z.number(),
55+
window: z.number(),
56+
})
57+
)
58+
.nullable()
59+
.optional(),
5060
});
5161

5262
export type QueueItem = z.infer<typeof QueueItem>;

0 commit comments

Comments
 (0)