Commit 56651d03 authored by Lukas Burgey's avatar Lukas Burgey

Fix a bug that caused a deployment loop

parent a2dc53a3
......@@ -610,9 +610,13 @@ class DeploymentState(models.Model):
# publish after we updated the values of the response
self._set_state(state, publish=True)
if state == FAILED or state == REJECTED:
return
# is the target reached now?
if str(self.state_target) != str(self.state):
LOGGER.debug(self.msg('Target {} still not reached. Publishing again'.format(
LOGGER.debug(self.msg('State is {}, but should be {}. Publishing again'.format(
self.state,
self.state_target,
)))
self.publish_to_client()
......
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