From 8d99ef116ce47d13772cb988d28918a02ac0340a Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Tue, 4 Nov 2014 10:39:53 -0600 Subject: [PATCH] Callback Receiver Fixes. --- awx/main/management/commands/run_callback_receiver.py | 3 ++- awx/main/queue.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/awx/main/management/commands/run_callback_receiver.py b/awx/main/management/commands/run_callback_receiver.py index 1cb8e2f30a..6b30c2ba53 100644 --- a/awx/main/management/commands/run_callback_receiver.py +++ b/awx/main/management/commands/run_callback_receiver.py @@ -90,11 +90,12 @@ class CallbackReceiver(object): time.sleep(0.1) def callback_handler(self, use_workers, worker_queues): + pubsub = PubSub('callbacks') message_number = 0 total_messages = 0 last_parent_events = {} - for message in pubsub.subscribe('callbacks'): + for message in pubsub.subscribe(): total_messages += 1 if not use_workers: self.process_job_event(message) diff --git a/awx/main/queue.py b/awx/main/queue.py index 777a1a4981..d71b4cbdfa 100644 --- a/awx/main/queue.py +++ b/awx/main/queue.py @@ -2,6 +2,7 @@ # All Rights Reserved. import json +import time from redis import StrictRedis