diff --git a/awx/api/templates/api/system_job_template_launch.md b/awx/api/templates/api/system_job_template_launch.md index f918840d24..4543014005 100644 --- a/awx/api/templates/api/system_job_template_launch.md +++ b/awx/api/templates/api/system_job_template_launch.md @@ -5,7 +5,7 @@ Make a POST request to this resource to launch the system job template. An extra parameter `extra_vars` is suggested in order to pass extra parameters to the system job task. -For example on `cleanup_jobs`, `cleanup_deleted`, and `cleanup_activitystream`: +For example on `cleanup_jobs` and `cleanup_activitystream`: `{"days": 30}` diff --git a/awx/main/migrations/0010_v300_create_system_job_templates.py b/awx/main/migrations/0010_v300_create_system_job_templates.py index 553a4f58c3..c67d5c8702 100644 --- a/awx/main/migrations/0010_v300_create_system_job_templates.py +++ b/awx/main/migrations/0010_v300_create_system_job_templates.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.db import migrations +from django.db import migrations, models from django.utils.timezone import now from awx.api.license import feature_enabled @@ -96,4 +96,14 @@ class Migration(migrations.Migration): operations = [ migrations.RunPython(create_system_job_templates, migrations.RunPython.noop), + migrations.AlterField( + model_name='systemjob', + name='job_type', + field=models.CharField(default=b'', max_length=32, blank=True, choices=[(b'cleanup_jobs', 'Remove jobs older than a certain number of days'), (b'cleanup_activitystream', 'Remove activity stream entries older than a certain number of days'), (b'cleanup_facts', 'Purge and/or reduce the granularity of system tracking data')]), + ), + migrations.AlterField( + model_name='systemjobtemplate', + name='job_type', + field=models.CharField(default=b'', max_length=32, blank=True, choices=[(b'cleanup_jobs', 'Remove jobs older than a certain number of days'), (b'cleanup_activitystream', 'Remove activity stream entries older than a certain number of days'), (b'cleanup_facts', 'Purge and/or reduce the granularity of system tracking data')]), + ), ] diff --git a/awx/main/models/jobs.py b/awx/main/models/jobs.py index 5fa332ac20..fc415b9af1 100644 --- a/awx/main/models/jobs.py +++ b/awx/main/models/jobs.py @@ -1169,7 +1169,6 @@ class SystemJobOptions(BaseModel): SYSTEM_JOB_TYPE = [ ('cleanup_jobs', _('Remove jobs older than a certain number of days')), ('cleanup_activitystream', _('Remove activity stream entries older than a certain number of days')), - ('cleanup_deleted', _('Purge previously deleted items from the database')), ('cleanup_facts', _('Purge and/or reduce the granularity of system tracking data')), ]