Skip to content

Commit bbe6b4f

Browse files
re-add heartbeat logging
1 parent 74255a4 commit bbe6b4f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ruby/lib/ci/queue/redis/supervisor.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@ def wait_for_workers
2323

2424
time_left = config.report_timeout
2525
time_left_with_no_workers = config.inactive_workers_timeout
26+
last_heartbeat_time = Time.now
2627
until exhausted? || time_left <= 0 || max_test_failed? || time_left_with_no_workers <= 0
2728
time_left -= 1
2829
sleep 1
2930

31+
# Heartbeat log every 5 minutes
32+
if Time.now - last_heartbeat_time > 300
33+
puts '[ci-queue] Still working'
34+
last_heartbeat_time = Time.now
35+
end
36+
3037
if active_workers?
3138
time_left_with_no_workers = config.inactive_workers_timeout
3239
else

0 commit comments

Comments
 (0)