Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
feudalBackend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
feudal
feudalBackend
Commits
ad23e6dc
Commit
ad23e6dc
authored
Sep 25, 2020
by
lukas.burgey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
feudal/backend/models/deployments.py
feudal/backend/models/deployments.py
+6
-3
No files found.
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