From b2e1f04ecf17cf6528403074fdc387a4a39e4c4c Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Tue, 16 Dec 2014 15:37:52 -0500 Subject: [PATCH] Include all cleanup tasks when the cleanup management job is run --- awx/main/tasks.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 8ec280a35f..33df9992fa 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -1114,12 +1114,14 @@ class RunSystemJob(BaseTask): if 'days' in json_vars: args.extend(['--days', str(json_vars['days'])]) if system_job.job_type == 'cleanup_jobs': - if 'jobs' in json_vars and json_vars['jobs']: - args.extend(['--jobs']) - if 'project_updates' in json_vars and json_vars['project_updates']: - args.extend(['--project-updates']) - if 'inventory_updates' in json_vars and json_vars['inventory_updates']: - args.extend(['--inventory-updates']) + args.extend(['--jobs', '--project-updates', '--inventory-updates']) + # Keeping this around in case we want to break this out + # if 'jobs' in json_vars and json_vars['jobs']: + # args.extend(['--jobs']) + # if 'project_updates' in json_vars and json_vars['project_updates']: + # args.extend(['--project-updates']) + # if 'inventory_updates' in json_vars and json_vars['inventory_updates']: + # args.extend(['--inventory-updates']) except Exception, e: logger.error("Failed to parse system job: " + str(e)) return args