added amq-departed

This commit is contained in:
yolanda.robla@canonical.com 2014-01-30 12:01:36 +01:00
parent 66d46e8a2a
commit e2a365d533

View File

@ -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',