Skip to content

Commit

Permalink
Merge pull request #259 from Shopify/cbruckmayer/fix-retry-queue-running
Browse files Browse the repository at this point in the history
Fix retry queue
  • Loading branch information
ChrisBr authored Feb 6, 2024
2 parents 5bc8813 + 1db3c71 commit 11d8a75
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ruby/lib/ci/queue/static.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,14 @@ def remaining
end

def running
1
@reserved_test ? 1 : 0
end

def poll
while !@shutdown && config.circuit_breakers.none?(&:open?) && !max_test_failed? && test = @queue.shift
yield index.fetch(test)
while !@shutdown && config.circuit_breakers.none?(&:open?) && !max_test_failed? && @reserved_test = @queue.shift
yield index.fetch(@reserved_test)
end
@reserved_test = nil
end

def exhausted?
Expand Down

0 comments on commit 11d8a75

Please sign in to comment.