mirror of
https://github.com/ansible/awx.git
synced 2026-08-02 10:59:56 -02:30
add a per-request GUID and log as it travels through background services
see: https://github.com/ansible/awx/issues/9329
This commit is contained in:
@@ -6,6 +6,7 @@ from multiprocessing import Process
|
||||
from django.conf import settings
|
||||
from django.db import connections
|
||||
from schedule import Scheduler
|
||||
from django_guid.middleware import GuidMiddleware
|
||||
|
||||
from awx.main.dispatch.worker import TaskWorker
|
||||
|
||||
@@ -35,6 +36,7 @@ class Scheduler(Scheduler):
|
||||
# If the database connection has a hiccup, re-establish a new
|
||||
# connection
|
||||
conn.close_if_unusable_or_obsolete()
|
||||
GuidMiddleware.set_guid(GuidMiddleware._generate_guid())
|
||||
self.run_pending()
|
||||
except Exception:
|
||||
logger.exception(
|
||||
|
||||
Reference in New Issue
Block a user