From c3eecf7b9f421762e3cead9c9707fffff22b4bb7 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Fri, 12 Jul 2024 10:22:06 -0400 Subject: [PATCH] Update index.ts --- apps/api/src/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index dc89c096..fe1ccb69 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -117,6 +117,8 @@ if (cluster.isMaster) { }); app.post(`/admin/${process.env.BULL_AUTH_KEY}/shutdown`, async (req, res) => { + + return res.status(200).json({ ok: true }); try { const wsq = getWebScraperQueue(); @@ -155,6 +157,8 @@ if (cluster.isMaster) { }); app.post(`/admin/${process.env.BULL_AUTH_KEY}/unpause`, async (req, res) => { + return res.status(200).json({ ok: true }); + await getWebScraperQueue().resume(false); res.json({ ok: true }); }); @@ -278,5 +282,7 @@ if (cluster.isMaster) { res.send({ isProduction: global.isProduction }); }); + + console.log(`Worker ${process.pid} started`); }