From 2661bb63e4578a5b2a97743615aee6144ffc20ee Mon Sep 17 00:00:00 2001 From: Alexandru Matei Date: Mon, 7 Oct 2024 13:57:21 +0300 Subject: [PATCH] fix --- packages/indexer/src/main.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/indexer/src/main.ts b/packages/indexer/src/main.ts index 5de5b385..761fa573 100644 --- a/packages/indexer/src/main.ts +++ b/packages/indexer/src/main.ts @@ -122,7 +122,6 @@ export async function Main(config: parseEnv.Config, logger: winston.Logger) { ); let exitRequested = false; - process.on("SIGINT", () => { if (!exitRequested) { logger.info( @@ -144,20 +143,21 @@ export async function Main(config: parseEnv.Config, logger: winston.Logger) { at: "Indexer#Main", }); // start all indexers in parallel, will wait for them to complete, but they all loop independently - const [hubPoolResult] = await Promise.allSettled([ - hubPoolIndexer.start(), - bundleProcessor.start(10), - ...spokePoolIndexers.map((s) => s.start()), - ]); + const [bundleResults, hubPoolResult, ...spokeResults] = + await Promise.allSettled([ + bundleProcessor.start(10), + hubPoolIndexer.start(), + ...spokePoolIndexers.map((s) => s.start()), + ]); logger.info({ at: "Indexer#Main", message: "Indexer loop completed", results: { - // spokeIndexerRunSuccess: [...spokeResults].every( - // (r) => r.status === "fulfilled", - // ), - // bundleProcessorRunSuccess: bundleResults.status === "fulfilled", + spokeIndexerRunSuccess: [...spokeResults].every( + (r) => r.status === "fulfilled", + ), + bundleProcessorRunSuccess: bundleResults.status === "fulfilled", hubPoolIndexerRunSuccess: hubPoolResult.status === "fulfilled", }, });