Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalBackend
Commits
ad23e6dc
Commit
ad23e6dc
authored
Sep 25, 2020
by
lukas.burgey
Browse files
Fix publishing
parent
4f96e5ba
Pipeline
#110847
failed with stage
in 1 minute and 28 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
feudal/backend/models/deployments.py
View file @
ad23e6dc
...
...
@@ -180,6 +180,7 @@ class VODeployment(Deployment):
if
created
:
LOGGER
.
debug
(
deployment
.
msg
(
'Created'
))
LOGGER
.
debug
(
'VO has services: %s'
,
vo
.
services
.
all
())
for
service
in
vo
.
services
.
all
():
DeploymentState
.
get_or_create
(
user
,
service
,
deployment
)
...
...
@@ -215,6 +216,7 @@ class ServiceDeployment(Deployment):
if
created
:
LOGGER
.
debug
(
deployment
.
msg
(
'Created'
))
LOGGER
.
debug
(
'Service exists: %s'
,
service
)
DeploymentState
.
get_or_create
(
user
,
service
,
deployment
)
return
deployment
...
...
@@ -430,12 +432,11 @@ class DeploymentState(models.Model):
self
.
audit_log_response
()
LOGGER
.
debug
(
self
.
msg
(
'Patched by client: {} - {}'
.
format
(
self
.
state
,
self
.
message
)))
self
.
publish_to_user
()
if
self
.
state
==
NOT_DEPLOYED
and
self
.
is_orphaned
:
# publish one last time so the webpage displays "not_deployed"
self
.
publish_to_user
()
LOGGER
.
debug
(
self
.
msg
(
'Deleting'
))
# don't delete 'self' but the DepState via its id
DeploymentState
.
objects
.
get
(
id
=
self
.
id
).
delete
()
return
...
...
@@ -559,6 +560,8 @@ class DeploymentState(models.Model):
self
.
save
()
self
.
publish_to_user
()
# always publish to the use when the state changes
else
:
LOGGER
.
debug
(
self
.
msg
(
'State unchanged: {}'
.
format
(
self
.
state
)))
def
publish_to_user
(
self
):
if
self
.
user
is
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment