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