chore(jetstream): log bulk-create record count on flush
This commit is contained in:
@@ -59,7 +59,7 @@ const fireWebhooks = async (
|
||||
await dispatchAll(webhooks, payload, `${verb} ${did}`);
|
||||
};
|
||||
|
||||
const BULK_CREATE_DEBOUNCE_MS = 3000;
|
||||
const BULK_CREATE_DEBOUNCE_MS = 15000;
|
||||
|
||||
type BulkBuffer = {
|
||||
records: Record<string, unknown>[];
|
||||
@@ -72,6 +72,7 @@ const flushBulkCreate = async (did: string): Promise<void> => {
|
||||
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 },
|
||||
|
||||
Reference in New Issue
Block a user