Merge branch 'main' into mog/job-stuck-fix

This commit is contained in:
Gergő Móricz 2024-07-12 16:33:34 +02:00 committed by GitHub
commit 69d724714f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {
console.log("Gracefully shutting down...");
await getWebScraperQueue().pause(false, true);
@ -283,5 +285,7 @@ if (cluster.isMaster) {
res.send({ isProduction: global.isProduction });
});
console.log(`Worker ${process.pid} started`);
}