mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
forgot to remove label cleanup periodic task
This commit is contained in:
@@ -47,7 +47,6 @@ from django.contrib.auth.models import User
|
||||
from awx.main.constants import CLOUD_PROVIDERS
|
||||
from awx.main.models import * # noqa
|
||||
from awx.main.models import UnifiedJob
|
||||
from awx.main.models.label import Label
|
||||
from awx.main.queue import FifoQueue
|
||||
from awx.main.conf import tower_settings
|
||||
from awx.main.task_engine import TaskSerializer, TASK_TIMEOUT_INTERVAL
|
||||
@@ -123,13 +122,6 @@ def run_administrative_checks(self):
|
||||
tower_admin_emails,
|
||||
fail_silently=True)
|
||||
|
||||
@task(bind=True)
|
||||
def run_label_cleanup(self):
|
||||
qs = Label.get_orphaned_labels()
|
||||
labels_count = qs.count()
|
||||
qs.delete()
|
||||
return labels_count
|
||||
|
||||
@task(bind=True)
|
||||
def cleanup_authtokens(self):
|
||||
AuthToken.objects.filter(expires__lt=now()).delete()
|
||||
|
||||
Reference in New Issue
Block a user