Projet

Général

Profil

0009-agent-common-does-not-send-notifications-when-in-a-F.patch

Benjamin Dauvergne, 06 octobre 2015 11:21

Télécharger (1,07 ko)

Voir les différences:

Subject: [PATCH 09/10] agent/common: does not send notifications when in a
 FakeTenant (#8425)

It breaks initial role migrations and new tenants deploy.
 hobo/agent/common/__init__.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
hobo/agent/common/__init__.py
7 7

  
8 8
def notify_agents(data):
9 9
    '''Send notifications to all other tenants'''
10
    tenant = connection.get_tenant()
11
    if not hasattr(tenant, 'domain_url'):
12
        # Fake tenant, certainly during migration, do nothing
13
        return
10 14
    notification = {
11
        'tenant': connection.get_tenant().domain_url,
15
        'tenant': tenant.domain_url,
12 16
        'data': data,
13 17
    }
14 18
    with Celery('hobo', broker=settings.BROKER_URL) as app:
15
-