Checks now inserted into db during monitor status check

This commit is contained in:
Alex Holliday committed 2024-06-17 13:52:20 -07:00
1 parent e278d243c8
commit 771cce98b5
4 files changed
+69 -41

No files matched your search

+3 -3
View File
@@ -162,9 +162,9 @@ const deleteMonitor = async (req, res, next) => {
try {
const monitor = await req.db.deleteMonitor(req, res, next);
// Delete associated checks and alerts
console.log(monitor);
req.jobQueue.deleteJob(monitor);
await req.jobQueue.deleteJob(monitor);
await req.db.deleteChecks(monitor._id);
await req.db.deleteAlertByMonitorId(monitor._id);
/**
* TODO
* We should remove all checks and alerts associated with this monitor