automate: add flash activity to db session
This commit is contained in:
parent
e163c58445
commit
827aab6ffb
1 changed files with 1 additions and 0 deletions
|
@ -114,6 +114,7 @@ def run_job(job_cls: Type[BaseAutomation], *,
|
|||
activity_type="automation",
|
||||
text=f"FLASH! Automation Failure: {automation.short_name}. See logs for details."
|
||||
)
|
||||
db.session.add(activity)
|
||||
activity.notify() # Notify before commit because the failure occurred even if we can't commit.
|
||||
automation.last_run = datetime.datetime.utcnow()
|
||||
db.session.commit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue