mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
feat(queue): async delivery via Cloudflare Queues with retry backoff and DLQ
This commit is contained in:
parent
737dd7af98
commit
486f38365f
16 changed files with 702 additions and 22 deletions
8
server/plugins/queue-consumer.ts
Normal file
8
server/plugins/queue-consumer.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import type { Env } from "../lib/types";
|
||||
import { handleQueueBatch } from "../lib/queue/consumer";
|
||||
|
||||
export default defineNitroPlugin((nitroApp) => {
|
||||
nitroApp.hooks.hook("cloudflare:queue", async ({ batch, env }) => {
|
||||
await handleQueueBatch(batch, env as Env);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue