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
f8bf46b8
Commit
f8bf46b8
authored
Sep 25, 2020
by
lukas.burgey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Deployment.publish
parent
ad23e6dc
Pipeline
#110850
failed with stage
in 1 minute and 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
16 deletions
+6
-16
feudal/backend/models/deployments.py
feudal/backend/models/deployments.py
+6
-16
No files found.
feudal/backend/models/deployments.py
View file @
f8bf46b8
...
...
@@ -108,29 +108,23 @@ class Deployment(PolymorphicModel):
self
.
publish_to_user
()
# publish if there are any pending states
for
item
in
self
.
states
.
all
():
if
item
.
is_pending
or
item
.
is_credential_pending
:
self
.
publish_to_client
()
return
# publish only once
def
user_credential_added
(
self
,
key
):
for
item
in
self
.
states
.
all
():
item
.
user_credential_added
(
key
)
if
self
.
state_target
==
DEPLOYED
:
self
.
publish
()
# TODO
# self.publish()
pass
def
user_credential_removed
(
self
,
key
):
for
item
in
self
.
states
.
all
():
item
.
user_credential_removed
(
key
)
if
self
.
state_target
==
DEPLOYED
:
self
.
publish
()
def
publish_to_client
(
self
):
for
state
in
self
.
states
.
all
():
state
.
publish_to_client
()
# TODO
# self.publish()
pass
# sends a state update via RabbitMQ / STOMP to the users webpage instance
def
publish_to_user
(
self
):
...
...
@@ -142,10 +136,6 @@ class Deployment(PolymorphicModel):
dumps
(
UpdateSerializer
({
'deployment'
:
self
}).
data
),
)
def
publish
(
self
):
self
.
publish_to_user
()
self
.
publish_to_client
()
def
msg
(
self
,
msg
):
# pragma: no cover
try
:
return
'{} - {}'
.
format
(
self
,
msg
)
...
...
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