From fd97aa85b64dca4ab3540f1de394e4235c32b053 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Wed, 27 Aug 2014 15:22:30 -0400 Subject: [PATCH] Attempt to work around a bug from old versions of pyzmq where closing the socket before immediately exiting could cause a crash --- awx/main/management/commands/run_callback_receiver.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/awx/main/management/commands/run_callback_receiver.py b/awx/main/management/commands/run_callback_receiver.py index 2e5ef0f5e9..0378d27d02 100644 --- a/awx/main/management/commands/run_callback_receiver.py +++ b/awx/main/management/commands/run_callback_receiver.py @@ -187,6 +187,8 @@ class CallbackReceiver(object): if messages_processed >= MAX_REQUESTS: print("Shutting down message receiver") pool_subscriber.close() + pool_context.term() + time.sleep(0.1) sys.exit(0) class Command(NoArgsCommand):