lint
This commit is contained in:
parent
6df0083842
commit
10ffdff2c3
14 changed files with 46 additions and 16 deletions
|
@ -124,11 +124,11 @@ def run_job(job_cls: Type[BaseAutomation], *,
|
|||
trace = TracebackException.from_exception(exc)
|
||||
success = False
|
||||
logs = "\n".join(trace.format())
|
||||
if success:
|
||||
if job is not None and success:
|
||||
automation.state = AutomationState.IDLE
|
||||
automation.next_run = datetime.datetime.utcnow() + datetime.timedelta(
|
||||
minutes=getattr(job, "frequency", 7))
|
||||
if 'TERRAFORM_DIRECTORY' not in app.config:
|
||||
if 'TERRAFORM_DIRECTORY' not in app.config and working_dir is not None:
|
||||
# We used a temporary working directory
|
||||
shutil.rmtree(working_dir)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue