1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 06:51:10 +03:00

Include all cleanup tasks when the cleanup management job is run

This commit is contained in:
Matthew Jones 2014-12-16 15:37:52 -05:00
parent f422d86355
commit b2e1f04ecf

View File

@ -1114,12 +1114,14 @@ class RunSystemJob(BaseTask):
if 'days' in json_vars: if 'days' in json_vars:
args.extend(['--days', str(json_vars['days'])]) args.extend(['--days', str(json_vars['days'])])
if system_job.job_type == 'cleanup_jobs': if system_job.job_type == 'cleanup_jobs':
if 'jobs' in json_vars and json_vars['jobs']: args.extend(['--jobs', '--project-updates', '--inventory-updates'])
args.extend(['--jobs']) # Keeping this around in case we want to break this out
if 'project_updates' in json_vars and json_vars['project_updates']: # if 'jobs' in json_vars and json_vars['jobs']:
args.extend(['--project-updates']) # args.extend(['--jobs'])
if 'inventory_updates' in json_vars and json_vars['inventory_updates']: # if 'project_updates' in json_vars and json_vars['project_updates']:
args.extend(['--inventory-updates']) # args.extend(['--project-updates'])
# if 'inventory_updates' in json_vars and json_vars['inventory_updates']:
# args.extend(['--inventory-updates'])
except Exception, e: except Exception, e:
logger.error("Failed to parse system job: " + str(e)) logger.error("Failed to parse system job: " + str(e))
return args return args