Handle service start-limit-hit failure event case in sysmonitor (#16174)

This commit is contained in:
Senthil Kumar Guruswamy 2023-09-01 00:37:42 +05:30 committed by GitHub
parent fdd5deb453
commit 34e5d266e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ class MonitorSystemBusTask(ProcessTaskBase):
self.task_queue = myQ self.task_queue = myQ
def on_job_removed(self, id, job, unit, result): def on_job_removed(self, id, job, unit, result):
if result == "done": if result == "done" or result == "failed":
timestamp = "{}".format(datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S")) timestamp = "{}".format(datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S"))
msg = {"unit": unit, "evt_src":"sysbus", "time":timestamp} msg = {"unit": unit, "evt_src":"sysbus", "time":timestamp}
self.task_notify(msg) self.task_notify(msg)