From 2e36ffda5bb9c8e8cf4fa0237fc4dcf7942d0c67 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Sun, 14 Jan 2024 13:45:08 +0300 Subject: [PATCH] Fix stopping condition of regular reporting --- src/subcommand/execute.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/subcommand/execute.ts b/src/subcommand/execute.ts index 1af8823..7999d4c 100644 --- a/src/subcommand/execute.ts +++ b/src/subcommand/execute.ts @@ -197,7 +197,8 @@ export async function start(argv:Args) { // queue size is 0, but there are unresolved tasks --> hit the rate limit, should stop reporting // queue size is 0, there are no unresolved tasks --> queue is completed, should stop reporting const queueState = taskQueue.getState(); - if (queueState.size == 0) { + if (queueState.size == 0 && queueState.pending == 0) { + logger.info("Queue is empty. Stopping regular reporting."); break; } }