fix(config): transact per-group configuration

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.
This commit is contained in:
翅膀 committed 2026-10-23 23:23:25 +08:00
1 parent ceb906d479
commit c853f2910f
7 files changed
+1764 -587

No files matched your search

+2
View File
@@ -1,8 +1,10 @@
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);
});
});