From 96c01bc5e4b6df38f0ade8167777bffd3411e07c Mon Sep 17 00:00:00 2001 From: Bossett Date: Wed, 1 Jan 2025 00:21:57 +0000 Subject: [PATCH] larger queue, more concurrency --- src/util/subscription.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/subscription.ts b/src/util/subscription.ts index 3c4e98e..2a39693 100755 --- a/src/util/subscription.ts +++ b/src/util/subscription.ts @@ -13,7 +13,7 @@ import WebSocket from 'ws' import { Semaphore } from 'async-mutex' -const semaphore = new Semaphore(16) +const semaphore = new Semaphore(128) const includedRecords = new Set(['app.bsky.feed.post']) @@ -38,7 +38,7 @@ export abstract class FirehoseSubscriptionBase { this.jetstream.on('commit', (event) => { eventQueue.push(event) if ( - eventQueue.length > 1000 && + eventQueue.length > 10000 && this.jetstream.ws?.readyState === WebSocket.OPEN ) { console.log('core: queue too large, closing jetstream...')