update monitor interval and data
This commit is contained in:
1 parent
4e0349bd58
commit
46b342005a
1 file changed
+2
-1
@@ -88,7 +88,7 @@ class SuperSimpleQueue {
|
|||||||
};
|
};
|
||||||
|
|
||||||
updateJob = async (monitor) => {
|
updateJob = async (monitor) => {
|
||||||
this.scheduler.updateJob(monitor._id.toString(), monitor.interval);
|
this.scheduler.updateJob(monitor._id.toString(), { repeat: monitor.interval, data: monitor.toObject() });
|
||||||
};
|
};
|
||||||
|
|
||||||
shutdown = async () => {
|
shutdown = async () => {
|
||||||
@@ -141,6 +141,7 @@ class SuperSimpleQueue {
|
|||||||
monitorId: job.id,
|
monitorId: job.id,
|
||||||
monitorUrl: job?.data?.url || null,
|
monitorUrl: job?.data?.url || null,
|
||||||
monitorType: job?.data?.type || null,
|
monitorType: job?.data?.type || null,
|
||||||
|
monitorInterval: job?.data?.interval || null,
|
||||||
active: job.active,
|
active: job.active,
|
||||||
lockedAt: job.lockedAt,
|
lockedAt: job.lockedAt,
|
||||||
runCount: job.runCount || 0,
|
runCount: job.runCount || 0,
|
||||||
|
|||||||
Reference in new issue
Block a user