From b219682f39b233e1c78792538777ed2be7b7d86b Mon Sep 17 00:00:00 2001 From: cannorin Date: Sun, 29 Dec 2024 09:07:13 +0000 Subject: [PATCH] Refactoring (2) --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 97df84d..e57d706 100644 --- a/index.ts +++ b/index.ts @@ -242,7 +242,6 @@ function initializeStream() { } }); } -initializeStream(); /** pop from the job queue and run it */ async function runJob() { @@ -277,6 +276,7 @@ async function pushJob() { async function main() { try { + initializeStream(); try { await Promise.all([runJob(), pushJob()]); } catch (e) {