agent: notify primary agent when hobo registers secondary services (#34970)
This commit is contained in:
parent
83ee68e26a
commit
a5f0dac3a5
|
@ -4,6 +4,7 @@ from django.utils.timezone import now
|
|||
from tenant_schemas.utils import tenant_context
|
||||
|
||||
from hobo.agent.common.management.commands import hobo_deploy
|
||||
from hobo.deploy.signals import notify_agents
|
||||
from hobo.environment.models import AVAILABLE_SERVICES, Hobo, Variable
|
||||
from hobo.multitenant.middleware import TenantMiddleware, TenantNotFound
|
||||
|
||||
|
@ -95,3 +96,8 @@ class Command(hobo_deploy.Command):
|
|||
name='ou-slug', auto=True, service_pk=None)
|
||||
variable.value = me['slug']
|
||||
variable.save()
|
||||
|
||||
if me.get('secondary'):
|
||||
# on the primary hobo, notify other primary services, this will
|
||||
# get authentic to know about secondary services
|
||||
notify_agents(None)
|
||||
|
|
Loading…
Reference in New Issue