From a99d56e11b369426771eb202caf9a42c35349f12 Mon Sep 17 00:00:00 2001 From: dillonstreator Date: Thu, 21 Dec 2023 22:15:45 -0600 Subject: [PATCH] clarify event handler max concurrency note --- src/processor.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/processor.ts b/src/processor.ts index bd996df..20840aa 100644 --- a/src/processor.ts +++ b/src/processor.ts @@ -146,6 +146,9 @@ export const processEvents = async ( _opts.logger?.debug(`processing event`, { eventId: lockedEvent.id }); // TODO: consider concurrently processing events handler with max concurrency configuration + // + // handlers are already concurrently executed but a configuration for max concurrency could be + // nice especially if a client has many handlers for a given event type await Promise.allSettled( Object.entries(eventHandlerMap).map( async ([handlerName, handler]): Promise => {