From 5d48cecee8ce727f046efd4d216c66314ab7586f Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 30 Oct 2025 10:57:48 -0700 Subject: [PATCH] fix missing param --- .../v1/infrastructure/SuperSimpleQueue/SuperSimpleQueue.js | 4 ++-- server/src/service/v1/infrastructure/emailService.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/service/v1/infrastructure/SuperSimpleQueue/SuperSimpleQueue.js b/server/src/service/v1/infrastructure/SuperSimpleQueue/SuperSimpleQueue.js index ac1286e10..a3cdea8e7 100644 --- a/server/src/service/v1/infrastructure/SuperSimpleQueue/SuperSimpleQueue.js +++ b/server/src/service/v1/infrastructure/SuperSimpleQueue/SuperSimpleQueue.js @@ -35,9 +35,9 @@ class SuperSimpleQueue { this.scheduler.addTemplate("monitor-job", this.helper.getMonitorJob()); const monitors = await this.db.monitorModule.getAllMonitors(); for (const monitor of monitors) { - const randomOffset = Math.floor(Math.random() * monitor.interval); + const randomOffset = Math.floor(Math.random() * 100); setTimeout(() => { - this.addJob(monitor); + this.addJob(monitor._id, monitor); }, randomOffset); } diff --git a/server/src/service/v1/infrastructure/emailService.js b/server/src/service/v1/infrastructure/emailService.js index bc040d51a..ed661ff16 100755 --- a/server/src/service/v1/infrastructure/emailService.js +++ b/server/src/service/v1/infrastructure/emailService.js @@ -46,7 +46,7 @@ class EmailService { */ this.loadTemplate = (templateName) => { try { - const templatePath = this.path.join(__dirname, `../../templates/${templateName}.mjml`); + const templatePath = this.path.join(__dirname, `../../../templates/${templateName}.mjml`); const templateContent = this.fs.readFileSync(templatePath, "utf8"); return this.compile(templateContent); } catch (error) {