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:
Matthew Jones 2014-09-04 09:57:42 -04:00
parent 1e36c670e5
commit efab451632

View File

@ -28,7 +28,7 @@ from awx.main.models import *
# ZeroMQ
import zmq
MAX_REQUESTS = 20000
MAX_REQUESTS = 10000
WORKERS = 4
class CallbackReceiver(object):
@ -122,6 +122,10 @@ class CallbackReceiver(object):
w = Process(target=self.callback_worker, args=(queue_actual_worker[1],))
w.daemon = True
w.start()
signal.signal(signal.SIGINT, shutdown_handler([w]))
signal.signal(signal.SIGTERM, shutdown_handler([w]))
queue_actual_worker[2] = w
last_parent_events[message['job_id']] = job_parent_events
consumer_subscriber.send("1")