mirror of
https://github.com/ansible/awx.git
synced 2026-02-18 19:50:05 -03:30
Purge cleanup_deleted tasks as they aren't needed
This also adds a periodic static task to cleanup auth tokens
This commit is contained in:
@@ -117,6 +117,10 @@ def run_label_cleanup(self):
|
||||
qs.delete()
|
||||
return labels_count
|
||||
|
||||
@task(bind=True)
|
||||
def cleanup_authtokens(self):
|
||||
AuthToken.objects.filter(expires__lt=now()).delete()
|
||||
|
||||
@task(bind=True)
|
||||
def tower_periodic_scheduler(self):
|
||||
def get_last_run():
|
||||
@@ -1689,13 +1693,6 @@ class RunSystemJob(BaseTask):
|
||||
args.extend(['--older_than', str(json_vars['older_than'])])
|
||||
if 'granularity' in json_vars:
|
||||
args.extend(['--granularity', str(json_vars['granularity'])])
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user