From a35fb0397dbe1db7fc030c11417c5c9af2b85ef7 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Tue, 5 May 2026 12:52:27 +0200 Subject: [PATCH] chore(jetstream): log bulk-create record count on flush --- jetstream.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jetstream.ts b/jetstream.ts index 8958564..03e77c6 100644 --- a/jetstream.ts +++ b/jetstream.ts @@ -59,7 +59,7 @@ const fireWebhooks = async ( await dispatchAll(webhooks, payload, `${verb} ${did}`); }; -const BULK_CREATE_DEBOUNCE_MS = 3000; +const BULK_CREATE_DEBOUNCE_MS = 5000; type BulkBuffer = { records: Record[]; @@ -72,6 +72,7 @@ const flushBulkCreate = async (did: string): Promise => { if (!buffer) return; bulkBuffers.delete(did); const webhooks = getWebhooksByDidAndVerb(did, "bulk-create"); + log(`[jetstream] bulk-create ${did}: ${buffer.records.length} record(s)`); await dispatchAll( webhooks, { event: "bulk-create", did, records: buffer.records },