From 281fe905bd0f288848d5f7f333c61078b574eeb1 Mon Sep 17 00:00:00 2001 From: Iain Learmonth Date: Sat, 18 Jun 2022 14:16:38 +0100 Subject: [PATCH] automate: make automation failure message friendlier --- app/cli/automate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/cli/automate.py b/app/cli/automate.py index fc91e6c..7e81031 100644 --- a/app/cli/automate.py +++ b/app/cli/automate.py @@ -121,7 +121,10 @@ def run_job(job_cls: Type[BaseAutomation], *, db.session.add(log) activity = Activity( activity_type="automation", - text=f"FLASH! Automation Failure: {automation.short_name}. See logs for details." + text=(f"[{automation.short_name}] 🚨 Automation failure: It was not possible to handle this failure safely " + "and so the automation task has been automatically disabled. It may be possible to simply re-enable " + "the task, but repeated failures will usually require deeper investigation. See logs for full " + "details.") ) db.session.add(activity) activity.notify() # Notify before commit because the failure occurred even if we can't commit.