lint
This commit is contained in:
parent
f81ff2e1de
commit
afb98724d3
6 changed files with 10 additions and 8 deletions
|
@ -107,7 +107,6 @@ def run_job(job_cls: Type[BaseAutomation], *,
|
|||
# to be logged for investigation. Catching more specific exceptions would just mean that
|
||||
# others go unrecorded and are difficult to debug.
|
||||
except Exception as exc: # pylint: disable=broad-except
|
||||
raise exc
|
||||
trace = TracebackException.from_exception(exc)
|
||||
success = False
|
||||
logs = "\n".join(trace.format())
|
||||
|
@ -125,6 +124,7 @@ def run_job(job_cls: Type[BaseAutomation], *,
|
|||
log.updated = datetime.datetime.utcnow()
|
||||
log.logs = str(logs)
|
||||
db.session.add(log)
|
||||
db.session.commit()
|
||||
activity = Activity(
|
||||
activity_type="automation",
|
||||
text=(f"[{automation.short_name}] 🚨 Automation failure: It was not possible to handle this failure safely "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue