From 4ed054f568a127a2e6fbd46e5ef56db043c02166 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Wed, 8 Feb 2017 11:11:14 -0500 Subject: [PATCH] Implement optional message persistence on callback events --- awx/main/queue.py | 1 + awx/settings/defaults.py | 1 + 2 files changed, 2 insertions(+) diff --git a/awx/main/queue.py b/awx/main/queue.py index eb050d5fa0..03a7b2a2cf 100644 --- a/awx/main/queue.py +++ b/awx/main/queue.py @@ -43,6 +43,7 @@ class CallbackQueueDispatcher(object): compression='bzip2', exchange=self.exchange, declare=[self.exchange], + delivery_mode="persistent" if settings.PERSISTENT_CALLBACK_MESSAGES else "transient", routing_key=self.connection_queue) return except Exception, e: diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index 3f1213c918..cbe05ae83b 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -835,6 +835,7 @@ ACTIVITY_STREAM_ENABLED_FOR_INVENTORY_SYNC = False # Internal API URL for use by inventory scripts and callback plugin. INTERNAL_API_URL = 'http://127.0.0.1:%s' % DEVSERVER_DEFAULT_PORT +PERSISTENT_CALLBACK_MESSAGES = True USE_CALLBACK_QUEUE = True CALLBACK_QUEUE = "callback_tasks" FACT_QUEUE = "facts"