From ab0d106c4eb7dc108e12cce62401f247abd1d00c Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 6 May 2020 20:15:55 +0500 Subject: [PATCH 1/2] Add retry escalation to Escalation limit exceeded. --- services/escalator/escalation.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/escalator/escalation.py b/services/escalator/escalation.py index 99fe1e248c..76873effe7 100644 --- a/services/escalator/escalation.py +++ b/services/escalator/escalation.py @@ -125,6 +125,11 @@ def escalate(alarm_id, escalation_id, escalation_delay, login="correlator", *arg "Escalation limit exceeded (%s/%s). Skipping" % (ae, config.escalator.tt_escalation_limit) ) + Job.retry_after( + get_next_retry(), + "Escalation limit exceeded (%s/%s). Skipping" + % (ae, config.escalator.tt_escalation_limit) + ) return # Check whether consequences has escalations cons_escalated = sorted(alarm.iter_escalated(), key=operator.attrgetter("timestamp")) -- GitLab From 15cef863446fc807f91d5d84c9e44a33686e8a2f Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 6 May 2020 20:18:26 +0500 Subject: [PATCH 2/2] Fix black. --- services/escalator/escalation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/escalator/escalation.py b/services/escalator/escalation.py index 76873effe7..725e1f147b 100644 --- a/services/escalator/escalation.py +++ b/services/escalator/escalation.py @@ -128,7 +128,7 @@ def escalate(alarm_id, escalation_id, escalation_delay, login="correlator", *arg Job.retry_after( get_next_retry(), "Escalation limit exceeded (%s/%s). Skipping" - % (ae, config.escalator.tt_escalation_limit) + % (ae, config.escalator.tt_escalation_limit), ) return # Check whether consequences has escalations -- GitLab