From e2a365d533c141f5f47f23b5284bcbc7b813ef4c Mon Sep 17 00:00:00 2001 From: "yolanda.robla@canonical.com" <> Date: Thu, 30 Jan 2014 12:01:36 +0100 Subject: [PATCH] added amq-departed --- hooks/quantum_hooks.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hooks/quantum_hooks.py b/hooks/quantum_hooks.py index 10f7d3a2..a11a68ff 100755 --- a/hooks/quantum_hooks.py +++ b/hooks/quantum_hooks.py @@ -111,6 +111,15 @@ def amqp_joined(relation_id=None): vhost=config('rabbit-vhost')) +@hooks.hook('amqp-relation-departed') +@restart_on_change(restart_map()) +def amqp_departed(): + if 'amqp' not in CONFIGS.complete_contexts(): + juju_log('amqp relation incomplete. Peer not ready?') + return + CONFIGS.write_all() + + @hooks.hook('shared-db-relation-changed', 'amqp-relation-changed', 'cluster-relation-changed',