Update index.ts
This commit is contained in:
parent
961b27811d
commit
c3eecf7b9f
|
@ -117,6 +117,8 @@ if (cluster.isMaster) {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.post(`/admin/${process.env.BULL_AUTH_KEY}/shutdown`, async (req, res) => {
|
app.post(`/admin/${process.env.BULL_AUTH_KEY}/shutdown`, async (req, res) => {
|
||||||
|
|
||||||
|
return res.status(200).json({ ok: true });
|
||||||
try {
|
try {
|
||||||
const wsq = getWebScraperQueue();
|
const wsq = getWebScraperQueue();
|
||||||
|
|
||||||
|
@ -155,6 +157,8 @@ if (cluster.isMaster) {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.post(`/admin/${process.env.BULL_AUTH_KEY}/unpause`, async (req, res) => {
|
app.post(`/admin/${process.env.BULL_AUTH_KEY}/unpause`, async (req, res) => {
|
||||||
|
return res.status(200).json({ ok: true });
|
||||||
|
|
||||||
await getWebScraperQueue().resume(false);
|
await getWebScraperQueue().resume(false);
|
||||||
res.json({ ok: true });
|
res.json({ ok: true });
|
||||||
});
|
});
|
||||||
|
@ -278,5 +282,7 @@ if (cluster.isMaster) {
|
||||||
res.send({ isProduction: global.isProduction });
|
res.send({ isProduction: global.isProduction });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log(`Worker ${process.pid} started`);
|
console.log(`Worker ${process.pid} started`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue