fix missing param
This commit is contained in:
1 parent
f0bfe1a152
commit
5d48cecee8
2 files changed
+3
-3
No files matched your search
@@ -35,9 +35,9 @@ class SuperSimpleQueue {
|
|||||||
this.scheduler.addTemplate("monitor-job", this.helper.getMonitorJob());
|
this.scheduler.addTemplate("monitor-job", this.helper.getMonitorJob());
|
||||||
const monitors = await this.db.monitorModule.getAllMonitors();
|
const monitors = await this.db.monitorModule.getAllMonitors();
|
||||||
for (const monitor of monitors) {
|
for (const monitor of monitors) {
|
||||||
const randomOffset = Math.floor(Math.random() * monitor.interval);
|
const randomOffset = Math.floor(Math.random() * 100);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.addJob(monitor);
|
this.addJob(monitor._id, monitor);
|
||||||
}, randomOffset);
|
}, randomOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class EmailService {
|
|||||||
*/
|
*/
|
||||||
this.loadTemplate = (templateName) => {
|
this.loadTemplate = (templateName) => {
|
||||||
try {
|
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");
|
const templateContent = this.fs.readFileSync(templatePath, "utf8");
|
||||||
return this.compile(templateContent);
|
return this.compile(templateContent);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in new issue
Block a user