Conversation
Updated the result from binding delete action and
|
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/175331843 The labels on this github issue will be updated when the story is started. |
| self.polling_interval_seconds = polling_status[:retry_after] | ||
| end | ||
| rescue => e | ||
| if route_binding.reload.last_operation.state != 'failed' |
There was a problem hiding this comment.
You could technically skip this and always save "state failed" 🤔
There was a problem hiding this comment.
the intention here was to not change the description - as set by the previous steps. Happy to change it if you think it makes sense.
E.g poll can through LastOperationFailed and also sets the state to failed with the right description.
There was a problem hiding this comment.
Fair enough. I was assuming that whatever is raising, is doing it with the correct error message. But maybe not?
| DeleteStatus = Struct.new(:finished, :operation).freeze | ||
| DeleteStarted = ->(operation) { DeleteStatus.new(false, operation) } | ||
| DeleteComplete = DeleteStatus.new(true, nil).freeze | ||
|
|
||
| PollingStatus = Struct.new(:finished, :retry_after).freeze | ||
| PollingFinished = PollingStatus.new(true, nil).freeze | ||
| ContinuePolling = ->(retry_after) { PollingStatus.new(false, retry_after) } |
There was a problem hiding this comment.
Starting to think we may want to extract this into a common place (create has similar structs)... But its fine as is for now
#174748133