Enable HA & TTL on declared queues
Change-Id: Idaed8621e4c14c49d9173243ec5af444e9a3a80e
This commit is contained in:
parent
1ad08099cf
commit
214b457636
@ -63,8 +63,8 @@ class ConductorWorkflowService(service.Service):
|
||||
while True:
|
||||
try:
|
||||
with self.create_rmq_client() as mq:
|
||||
mq.declare('tasks', 'tasks')
|
||||
mq.declare('task-results')
|
||||
mq.declare('tasks', 'tasks', enable_ha=True)
|
||||
mq.declare('task-results', enable_ha=True)
|
||||
with mq.open('tasks',
|
||||
prefetch_count=
|
||||
cfg.CONF.max_environments) as subscription:
|
||||
|
@ -19,7 +19,7 @@ class VmAgentExecutor(CommandBase):
|
||||
self._pending_list = []
|
||||
self._results_queue = '-execution-results-%s' % str(stack).lower()
|
||||
self._reporter = reporter
|
||||
rmqclient.declare(self._results_queue)
|
||||
rmqclient.declare(self._results_queue, enable_ha=True, ttl=86400000)
|
||||
|
||||
def execute(self, template, mappings, unit, service, callback, metadata_id,
|
||||
timeout=None):
|
||||
@ -46,7 +46,7 @@ class VmAgentExecutor(CommandBase):
|
||||
msg = Message()
|
||||
msg.body = template
|
||||
msg.id = msg_id
|
||||
self._rmqclient.declare(queue)
|
||||
self._rmqclient.declare(queue, enable_ha=True, ttl=86400000)
|
||||
self._rmqclient.send(message=msg, key=queue)
|
||||
log.info('Sending RMQ message {0} to {1} with id {2}'.format(
|
||||
TokenSanitizer().sanitize(template), queue, msg_id))
|
||||
|
@ -24,7 +24,7 @@ class Reporter(object):
|
||||
self._rmqclient = rmqclient
|
||||
self._task_id = task_id
|
||||
self._environment_id = environment_id
|
||||
rmqclient.declare('task-reports')
|
||||
rmqclient.declare('task-reports', enable_ha=True)
|
||||
|
||||
def report_generic(self, text, details=None, level='info'):
|
||||
return self._report_func(None, None, text, details, level)
|
||||
|
@ -11,7 +11,8 @@ netaddr>=0.7.6
|
||||
|
||||
oslo.config>=1.2.0
|
||||
deep
|
||||
murano-common>=0.2.2
|
||||
# Please, revert to murano-common>=x.x.x before release
|
||||
http://tarballs.openstack.org/murano-common/murano-common-master.tar.gz#egg=murano-common-0.4
|
||||
PyYAML>=3.1.0
|
||||
murano-metadataclient==0.4.a13.gd65dfd2
|
||||
python-neutronclient>=2.3.1
|
||||
|
Loading…
Reference in New Issue
Block a user