add update job method

This commit is contained in:
Alex Holliday committed 2025-06-08 08:41:42 +08:00
1 parent 9a22d4a971
commit 7475dcfb21
3 files changed
+24 -6

No files matched your search

+2 -4
View File
@@ -550,10 +550,8 @@ class MonitorController {
})
);
// Delete the old job(editedMonitor has the same ID as the old monitor)
await this.jobQueue.deleteJob(monitorBeforeEdit);
// Add the new job back to the queue
await this.jobQueue.addJob(editedMonitor._id, editedMonitor);
await this.jobQueue.updateJob(editedMonitor);
return res.success({
msg: this.stringService.monitorEdit,
data: editedMonitor,