mirror of
https://github.com/ansible/awx.git
synced 2026-02-18 19:50:05 -03:30
Fix an issue where I wasn't reattaching the signal handlers to the child
worker processes when they were restarted
This commit is contained in:
@@ -28,7 +28,7 @@ from awx.main.models import *
|
|||||||
# ZeroMQ
|
# ZeroMQ
|
||||||
import zmq
|
import zmq
|
||||||
|
|
||||||
MAX_REQUESTS = 20000
|
MAX_REQUESTS = 10000
|
||||||
WORKERS = 4
|
WORKERS = 4
|
||||||
|
|
||||||
class CallbackReceiver(object):
|
class CallbackReceiver(object):
|
||||||
@@ -122,6 +122,10 @@ class CallbackReceiver(object):
|
|||||||
w = Process(target=self.callback_worker, args=(queue_actual_worker[1],))
|
w = Process(target=self.callback_worker, args=(queue_actual_worker[1],))
|
||||||
w.daemon = True
|
w.daemon = True
|
||||||
w.start()
|
w.start()
|
||||||
|
|
||||||
|
signal.signal(signal.SIGINT, shutdown_handler([w]))
|
||||||
|
signal.signal(signal.SIGTERM, shutdown_handler([w]))
|
||||||
|
|
||||||
queue_actual_worker[2] = w
|
queue_actual_worker[2] = w
|
||||||
last_parent_events[message['job_id']] = job_parent_events
|
last_parent_events[message['job_id']] = job_parent_events
|
||||||
consumer_subscriber.send("1")
|
consumer_subscriber.send("1")
|
||||||
|
|||||||
Reference in New Issue
Block a user