Enable safe jobs
This commit is contained in:
parent
d754f0b2bc
commit
819e78e0d6
1 changed files with 5 additions and 1 deletions
|
@ -152,7 +152,11 @@ def run_job(job_cls: Type[BaseAutomation], *,
|
||||||
shutil.rmtree(working_dir)
|
shutil.rmtree(working_dir)
|
||||||
else:
|
else:
|
||||||
automation.state = AutomationState.ERROR
|
automation.state = AutomationState.ERROR
|
||||||
automation.enabled = False
|
safe_jobs = [
|
||||||
|
"proxy_cloudfront", "static_aws", "list_http_post", "list_s3", "list_github", "list_gitlab"
|
||||||
|
]
|
||||||
|
if job.short_name not in safe_jobs:
|
||||||
|
automation.enabled = False
|
||||||
automation.next_run = None
|
automation.next_run = None
|
||||||
log = AutomationLogs()
|
log = AutomationLogs()
|
||||||
log.automation_id = automation.id
|
log.automation_id = automation.id
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue