add cacheable dns, stagger start times

This commit is contained in:
Alex Holliday committed 2025-10-28 22:41:05 -07:00
1 parent bd2ba804ee
commit 30a9309bd8
3 files changed
+18 -3

No files matched your search

@@ -35,8 +35,12 @@ class SuperSimpleQueue {
this.scheduler.addTemplate("monitor-job", this.helper.getMonitorJob());
const monitors = await this.db.monitorModule.getAllMonitors();
for (const monitor of monitors) {
await this.addJob(monitor._id, monitor);
const randomOffset = Math.floor(Math.random() * monitor.interval);
setTimeout(() => {
this.addJob(monitor);
}, randomOffset);
}
return true;
} catch (error) {
this.logger.error({