mirror of
https://github.com/ansible/awx.git
synced 2026-05-04 16:15:33 -02:30
don't ship external logs from the main thread of the dispatcher
this is a fairly esoteric change that attempts to work around a bug we've discovered in cpython itself context: https://github.com/ansible/awx/issues/4181
This commit is contained in:
@@ -10,6 +10,7 @@ from django.core.management.base import BaseCommand
|
||||
from django.db import connection as django_connection, connections
|
||||
from kombu import Exchange, Queue
|
||||
|
||||
from awx.main.utils.handlers import AWXProxyHandler
|
||||
from awx.main.dispatch import get_local_queuename, reaper
|
||||
from awx.main.dispatch.control import Control
|
||||
from awx.main.dispatch.kombu import Connection
|
||||
@@ -121,6 +122,12 @@ class Command(BaseCommand):
|
||||
|
||||
reaper.reap()
|
||||
consumer = None
|
||||
|
||||
# don't ship external logs inside the dispatcher's parent process
|
||||
# this exists to work around a race condition + deadlock bug on fork
|
||||
# in cpython itself:
|
||||
# https://bugs.python.org/issue37429
|
||||
AWXProxyHandler.disable()
|
||||
with Connection(settings.BROKER_URL) as conn:
|
||||
try:
|
||||
bcast = 'tower_broadcast_all'
|
||||
|
||||
Reference in New Issue
Block a user