If the resource is already being destroyed, we don't want to hop to the `destroy` label again when the `destroy` semaphore is incremented. We check the current label to avoid hopping again. Sometimes we forget to update the list of labels to check when we add new labels after a destroy. Instead of checking the labels separately, we can increase another semaphore, like `destroying`, along with the `destroy` semaphore and keep it incremented until the resource is destroyed. We incremented destroying semaphore autmatically when `hop_destroy` called. So if the operator calls it via pry, it will be incremented too.
13 KiB
13 KiB