debug logging
This commit is contained in:
1 parent
22645d86f7
commit
e50240885d
1 file changed
+5
-1
@@ -115,6 +115,10 @@ class SuperSimpleQueueHelper {
|
|||||||
// Step 4. Update monitor status
|
// Step 4. Update monitor status
|
||||||
const statusChangeResult = await this.statusService.updateMonitorStatus(status, check);
|
const statusChangeResult = await this.statusService.updateMonitorStatus(status, check);
|
||||||
|
|
||||||
|
// Step 5. Get decisions
|
||||||
|
const decision = this.evaluateMonitorAction(statusChangeResult);
|
||||||
|
console.log(JSON.stringify(decision, null, 2));
|
||||||
|
|
||||||
// Step 5 handle notifications (best effort, continue even in event of failure, don't wait)
|
// Step 5 handle notifications (best effort, continue even in event of failure, don't wait)
|
||||||
this.notificationsService
|
this.notificationsService
|
||||||
.handleNotifications(statusChangeResult.monitor, status, statusChangeResult.prevStatus, statusChangeResult.statusChanged)
|
.handleNotifications(statusChangeResult.monitor, status, statusChangeResult.prevStatus, statusChangeResult.statusChanged)
|
||||||
@@ -182,7 +186,7 @@ class SuperSimpleQueueHelper {
|
|||||||
return maintenanceWindowIsActive;
|
return maintenanceWindowIsActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
private evaluateMonitorAction(statusChangeResult: StatusChangeResult, networkResponse: MonitorStatusResponse): MonitorActionDecision {
|
private evaluateMonitorAction(statusChangeResult: StatusChangeResult): MonitorActionDecision {
|
||||||
const { monitor, statusChanged, prevStatus, thresholdBreaches } = statusChangeResult;
|
const { monitor, statusChanged, prevStatus, thresholdBreaches } = statusChangeResult;
|
||||||
|
|
||||||
// Initialize result
|
// Initialize result
|
||||||
|
|||||||
Reference in new issue
Block a user