clean stale dispatcher connections closer to post-fork

see: https://github.com/ansible/awx/issues/9559
This commit is contained in:
Ryan Petrello 2021-03-11 11:13:22 -05:00
parent e8b2072ea5
commit 572c0fbb74
2 changed files with 2 additions and 1 deletions

View File

@ -352,7 +352,6 @@ class SettingsWrapper(UserSettingsHolder):
self.cache.set_many(settings_to_cache, timeout=SETTING_CACHE_TIMEOUT)
def _get_local(self, name, validate=True):
self.__clean_on_fork__()
self._preload_cache()
cache_key = Setting.get_cache_key(name)
try:

View File

@ -6,6 +6,7 @@ import traceback
from kubernetes.config import kube_config
from django.conf import settings
from django_guid.middleware import GuidMiddleware
from awx.main.tasks import dispatch_startup, inform_cluster_of_shutdown
@ -85,6 +86,7 @@ class TaskWorker(BaseWorker):
'task': u'awx.main.tasks.RunProjectUpdate'
}
'''
settings.__clean_on_fork__()
result = None
try:
result = self.run_callable(body)