remove support for celery_active_tasks

This commit is contained in:
AlanCoding 2017-07-31 10:58:29 -04:00
parent 60eba9fbe2
commit 9572b429ad
3 changed files with 0 additions and 9 deletions

View File

@ -18,8 +18,6 @@ from collections import OrderedDict
# Django
from django.conf import settings
from django.contrib.auth.models import User, AnonymousUser
from django.core.cache import cache
from django.core.exceptions import FieldError
from django.db.models import Q, Count, F
from django.db import IntegrityError, transaction, connection
@ -228,16 +226,12 @@ class ApiV1PingView(APIView):
Everything returned here should be considered public / insecure, as
this requires no auth and is intended for use by the installer process.
"""
active_tasks = cache.get("active_celery_tasks", None)
response = {
'ha': is_ha_environment(),
'version': get_awx_version(),
'active_node': settings.CLUSTER_HOST_ID,
}
if not isinstance(request.user, AnonymousUser):
response['celery_active_tasks'] = json.loads(active_tasks) if active_tasks is not None else None
response['instances'] = []
for instance in Instance.objects.all():
response['instances'].append(dict(node=instance.hostname, heartbeat=instance.modified,

View File

@ -4,7 +4,6 @@
# Python
from datetime import datetime, timedelta
import logging
import json
from sets import Set
# Django
@ -405,7 +404,6 @@ class TaskManager():
logger.debug("Failing inconsistent running jobs.")
celery_task_start_time = tz_now()
active_task_queues, active_tasks = self.get_active_tasks()
cache.set("active_celery_tasks", json.dumps(active_task_queues))
cache.set('last_celery_task_cleanup', tz_now())
if active_tasks is None:

View File

@ -233,7 +233,6 @@ of the Cluster. This includes:
* The instance servicing the HTTP request
* The last heartbeat time of all other instances in the cluster
* The state of the Job Queue
* The RabbitMQ cluster status
* Instance Groups and Instance membership in those groups