Commit b8f754ad authored by lukas.burgey's avatar lukas.burgey

Remove Deployment.publish

parent 370ee905
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment