fix(queue): bound batches and resume deliveries

A queue invocation has shared query and subrequest limits.
Use a small batch and shared send budget, renew fenced leases and
resume only unfinished work without exhausting unstarted messages.
This commit is contained in:
翅膀 committed 2026-10-23 23:23:35 +08:00
1 parent 4c03543790
commit 4fc784ab9f
3 files changed
+816 -62

No files matched your search

+3 -1
View File
@@ -51,7 +51,9 @@
"consumers": [
{
"queue": "webhooker-delivery",
"max_batch_size": 10,
// Small batches: one invocation may make 50 D1 queries and 50
// subrequests on Workers Free, and a delivery takes ~7 + its sends.
"max_batch_size": 3,
"max_batch_timeout": 30,
"max_retries": 5,
"dead_letter_queue": "webhooker-delivery-dlq"