Fix up usage of django-guid

It has replaced the class-based middleware, everything is
function-based now.
This commit is contained in:
Jeff Bradberry
2022-02-17 10:54:15 -05:00
parent 23e700a1ef
commit 1803c5bdb4
8 changed files with 17 additions and 16 deletions

View File

@@ -8,7 +8,7 @@ import stat
# Django
from django.utils.timezone import now
from django.conf import settings
from django_guid.middleware import GuidMiddleware
from django_guid import get_guid
# AWX
from awx.main.redact import UriCleaner
@@ -25,7 +25,7 @@ class RunnerCallback:
def __init__(self, model=None):
self.parent_workflow_job_id = None
self.host_map = {}
self.guid = GuidMiddleware.get_guid()
self.guid = get_guid()
self.job_created = None
self.recent_event_timings = deque(maxlen=settings.MAX_WEBSOCKET_EVENT_RATE)
self.dispatcher = CallbackQueueDispatcher()