automate: make automation failure message friendlier
This commit is contained in:
parent
7ceca2ace2
commit
281fe905bd
1 changed files with 4 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue