From 8c4d4a0543f13d172f8385a3f8499068a478f31e Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Mon, 13 Feb 2017 11:54:41 -0500 Subject: [PATCH] Protect Tower from Ansible core making changes to the event uuids --- awx/main/management/commands/run_callback_receiver.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/awx/main/management/commands/run_callback_receiver.py b/awx/main/management/commands/run_callback_receiver.py index e984e41bf4..c262b23024 100644 --- a/awx/main/management/commands/run_callback_receiver.py +++ b/awx/main/management/commands/run_callback_receiver.py @@ -70,8 +70,11 @@ class CallbackBrokerWorker(ConsumerMixin): callbacks=[self.process_task])] def process_task(self, body, message): - if "uuid" in body: - queue = UUID(body['uuid']).int % settings.JOB_EVENT_WORKERS + if "uuid" in body and body['uuid']: + try: + queue = UUID(body['uuid']).int % settings.JOB_EVENT_WORKERS + except Exception: + queue = self.total_messages % settings.JOB_EVENT_WORKERS else: queue = self.total_messages % settings.JOB_EVENT_WORKERS self.write_queue_worker(queue, body)