We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae138d6 commit 2e90d3eCopy full SHA for 2e90d3e
1 file changed
ruby/lib/ci/queue/redis/worker.rb
@@ -1,6 +1,7 @@
1
# frozen_string_literal: true
2
require 'ci/queue/static'
3
require 'set'
4
+require 'ci/queue/output_helpers'
5
6
module CI
7
module Queue
@@ -51,13 +52,15 @@ def master?
51
52
def poll
53
wait_for_master
54
last_heartbeat_time = Time.now
55
+ STDOUT.sync = true
56
until shutdown_required? || config.circuit_breakers.any?(&:open?) || exhausted? || max_test_failed?
57
if test = reserve
58
yield index.fetch(test)
59
else
60
# Log heartbeat every 5 minutes if this is the master process
61
if master? && Time.now - last_heartbeat_time > 300
- puts '[ci-queue] Still working'
62
+ STDOUT.puts '[ci-queue] Still working'
63
+ STDOUT.flush
64
65
end
66
sleep 0.05
0 commit comments