mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-20 17:13:49 +00:00
Whole-table writes and cached snapshots can overwrite other groups or resurrect removed configuration. Use per-group guarded writes, one-time identity migration and explicit unreadable-row failures.
11 lines
358 B
TypeScript
11 lines
358 B
TypeScript
import type { Env } from "../lib/types";
|
|
import { handleQueueBatch } from "../lib/queue/consumer";
|
|
import { initConfigStore } from "../lib/config";
|
|
|
|
export default defineNitroPlugin((nitroApp) => {
|
|
nitroApp.hooks.hook("cloudflare:queue", async ({ batch, env }) => {
|
|
initConfigStore(env as Env);
|
|
await handleQueueBatch(batch, env as Env);
|
|
});
|
|
});
|