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
|
||||
|
||||
def done_with_steps?
|
||||
@steps_done_ctr >= @steps.length
|
||||
end
|
||||
|
||||
def state
|
||||
return :blocked unless waitlist_empty?
|
||||
return @exit_state unless @exit_state.nil?
|
||||
|
@ -232,6 +236,8 @@ module Comfpile
|
|||
end
|
||||
|
||||
private def mark_state_change(state, reason, abort: false)
|
||||
return unless @exit_state.nil?
|
||||
|
||||
puts "#{@stage} #{target}: Reached state #{state}: #{reason}"
|
||||
@exit_state = state
|
||||
@reason = reason
|
||||
|
@ -270,7 +276,7 @@ module Comfpile
|
|||
end
|
||||
|
||||
@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
|
||||
@running = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue