Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisBr committed Feb 10, 2025
1 parent 3d0ad0d commit 8341991
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions ruby/lib/ci/queue/redis/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,19 @@ def poll
# only the master should perform this check because otherwise we will DDoS Redis when all workers
# try to fetch the processed tests at the same time
if master?
executed_tests = (redis.smembers(key('success-reports')) + redis.hkeys(key('error-reports'))).map { |id| id.dup.force_encoding(Encoding::BINARY) }
ids = @index.keys.map { |id| id.dup.force_encoding(Encoding::BINARY) }
missing_tests = ids - executed_tests

if exhausted? &&
(missing_tests = @index.keys - (redis.smembers(key('success-reports')) + redis.hkeys(key('error-reports')))) &&
missing_tests.size > 0
if exhausted? && missing_tests.size > 0
puts "ci-queue did not process all tests!"
puts "------- all tests"
puts ids.inspect
puts "------- executed tests"
puts executed_tests.inspect
puts "------- missing tests"
puts missing_tests.inspect
puts "--------------------------------"
end
end

Expand Down

0 comments on commit 8341991

Please sign in to comment.