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

@@ -15,8 +15,8 @@ from django.apps import apps
from django.db import models
from django.conf import settings
from django_guid import get_guid
from django_guid.log_filters import CorrelationId
from django_guid.middleware import GuidMiddleware
from awx import MODE
from awx.main.constants import LOGGER_BLOCKLIST
@@ -366,7 +366,7 @@ class SmartFilter(object):
class DefaultCorrelationId(CorrelationId):
def filter(self, record):
guid = GuidMiddleware.get_guid() or '-'
guid = get_guid() or '-'
if MODE == 'development':
guid = guid[:8]
record.guid = guid