Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions ruby/lib/ci/queue/redis/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,15 @@ def running
redis.zcard(key('running'))
end

def to_a
def test_ids
redis.multi do |transaction|
transaction.lrange(key('queue'), 0, -1)
transaction.zrange(key('running'), 0, -1)
end.flatten.reverse.map { |k| index.fetch(k) }
end.flatten
end

def to_a
test_ids.reverse.map { |k| index.fetch(k) }
end

def progress
Expand Down
14 changes: 13 additions & 1 deletion ruby/lib/ci/queue/redis/supervisor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,19 @@ def wait_for_workers
yield if block_given?
end

puts "Aborting, timed out." if time_left <= 0 && !exhausted?
if time_left <= 0 && !exhausted?
puts "Aborting, timed out."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like Aborting, timed out waiting for the following tests to finish executing: would make it a bit clearer.


remaining_tests = test_ids
remaining_tests.first(10).each do |id|
puts " #{id}"
end

if remaining_tests.size > 10
puts " ..."
end
end

puts "Aborting, it seems all workers died." if time_left_with_no_workers <= 0 && !exhausted?

exhausted?
Expand Down
Loading