mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-06 16:49:24 -05:00
Add check for monitor active state before adding jobs to queue on startup
This commit is contained in:
@@ -39,7 +39,9 @@ class JobQueue {
|
||||
queue.networkService = networkService;
|
||||
const monitors = await db.getAllMonitors();
|
||||
for (const monitor of monitors) {
|
||||
await queue.addJob(monitor.id, monitor);
|
||||
if (monitor.active) {
|
||||
await queue.addJob(monitor.id, monitor);
|
||||
}
|
||||
}
|
||||
const workerStats = await queue.getWorkerStats();
|
||||
await queue.scaleWorkers(workerStats);
|
||||
|
||||
Reference in New Issue
Block a user