fix: 🩹 fix erroneous success! setting when steps done but waitlist full
This commit is contained in:
parent
120c420f30
commit
493c04ac45
1 changed files with 7 additions and 1 deletions
|
@ -206,6 +206,10 @@ module Comfpile
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def done_with_steps?
|
||||||
|
@steps_done_ctr >= @steps.length
|
||||||
|
end
|
||||||
|
|
||||||
def state
|
def state
|
||||||
return :blocked unless waitlist_empty?
|
return :blocked unless waitlist_empty?
|
||||||
return @exit_state unless @exit_state.nil?
|
return @exit_state unless @exit_state.nil?
|
||||||
|
@ -232,6 +236,8 @@ module Comfpile
|
||||||
end
|
end
|
||||||
|
|
||||||
private def mark_state_change(state, reason, abort: false)
|
private def mark_state_change(state, reason, abort: false)
|
||||||
|
return unless @exit_state.nil?
|
||||||
|
|
||||||
puts "#{@stage} #{target}: Reached state #{state}: #{reason}"
|
puts "#{@stage} #{target}: Reached state #{state}: #{reason}"
|
||||||
@exit_state = state
|
@exit_state = state
|
||||||
@reason = reason
|
@reason = reason
|
||||||
|
@ -270,7 +276,7 @@ module Comfpile
|
||||||
end
|
end
|
||||||
|
|
||||||
@steps_done_ctr += 1
|
@steps_done_ctr += 1
|
||||||
succeed! "All done", abort: true if @steps_done_ctr >= @steps.length
|
succeed! "All done", abort: true if waitlist_empty? and done_with_steps?
|
||||||
|
|
||||||
ensure
|
ensure
|
||||||
@running = false
|
@running = false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue