applications: add explicit call to notify after new variables (#83979)
gitea/hobo/pipeline/head This commit looks good
Details
gitea/hobo/pipeline/head This commit looks good
Details
This commit is contained in:
parent
cd20f86100
commit
edcd930dee
|
@ -31,6 +31,7 @@ from django.utils.text import slugify
|
|||
from django.utils.timezone import now
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from hobo.deploy.signals import notify_agents
|
||||
from hobo.environment.models import Variable
|
||||
from hobo.environment.utils import get_installed_services
|
||||
|
||||
|
@ -464,6 +465,7 @@ class Version(models.Model):
|
|||
return None
|
||||
|
||||
def deploy_parameters(self, bundle):
|
||||
had_parameters = False
|
||||
tar_io = io.BytesIO(bundle)
|
||||
with tarfile.open(fileobj=tar_io) as tar:
|
||||
manifest = json.loads(tar.extractfile('manifest.json').read().decode())
|
||||
|
@ -480,6 +482,10 @@ class Version(models.Model):
|
|||
)
|
||||
variable.label = parameter.get('label')
|
||||
variable.save()
|
||||
had_parameters = True
|
||||
|
||||
if had_parameters:
|
||||
notify_agents(None)
|
||||
|
||||
def deploy_roles(self, bundle):
|
||||
tar_io = io.BytesIO(bundle)
|
||||
|
|
Loading…
Reference in New Issue