Commit a1bcaab8 authored by Matija Čupić's avatar Matija Čupić

Spread shared runner minute reset to 8h

parent ed9cf147
......@@ -10,7 +10,7 @@ class ClearSharedRunnersMinutesWorker # rubocop:disable Scalability/IdempotentWo
feature_category :continuous_integration
LEASE_TIMEOUT = 3600
TIME_SPREAD = 3.hours.seconds.freeze
TIME_SPREAD = 8.hours.seconds.freeze
BATCH_SIZE = 100_000
def perform
......
......@@ -147,12 +147,12 @@ RSpec.describe ClearSharedRunnersMinutesWorker do
end
it 'runs a worker per batch', :aggregate_failures do
# Spread evenly accross 3 hours (10,800 seconds)
# Spread evenly accross 8 hours (28,800 seconds)
expect(Ci::BatchResetMinutesWorker).to receive(:perform_in).with(0.seconds, 2, 4)
expect(Ci::BatchResetMinutesWorker).to receive(:perform_in).with(2700.seconds, 5, 7)
expect(Ci::BatchResetMinutesWorker).to receive(:perform_in).with(5400.seconds, 8, 10)
expect(Ci::BatchResetMinutesWorker).to receive(:perform_in).with(8100.seconds, 11, 13)
expect(Ci::BatchResetMinutesWorker).to receive(:perform_in).with(10800.seconds, 14, 16)
expect(Ci::BatchResetMinutesWorker).to receive(:perform_in).with(7200.seconds, 5, 7)
expect(Ci::BatchResetMinutesWorker).to receive(:perform_in).with(14400.seconds, 8, 10)
expect(Ci::BatchResetMinutesWorker).to receive(:perform_in).with(21600.seconds, 11, 13)
expect(Ci::BatchResetMinutesWorker).to receive(:perform_in).with(28800.seconds, 14, 16)
subject
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment