diff --git a/ee/app/workers/clear_shared_runners_minutes_worker.rb b/ee/app/workers/clear_shared_runners_minutes_worker.rb index 97a7a157182a6143b28b17ea82cf3d46eac9e9c6..941659a671b518d0763e25bf0c1d2b7761586d58 100644 --- a/ee/app/workers/clear_shared_runners_minutes_worker.rb +++ b/ee/app/workers/clear_shared_runners_minutes_worker.rb @@ -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 diff --git a/ee/changelogs/unreleased/mc-backstage-spread-shared-runner-minute-reset-8-hours.yml b/ee/changelogs/unreleased/mc-backstage-spread-shared-runner-minute-reset-8-hours.yml new file mode 100644 index 0000000000000000000000000000000000000000..0649fcbe2577da2c922fbb5dc12a7033c2f10e46 --- /dev/null +++ b/ee/changelogs/unreleased/mc-backstage-spread-shared-runner-minute-reset-8-hours.yml @@ -0,0 +1,5 @@ +--- +title: Spread shared runner minute reset to 8h. +merge_request: 55802 +author: +type: performance diff --git a/ee/spec/workers/clear_shared_runners_minutes_worker_spec.rb b/ee/spec/workers/clear_shared_runners_minutes_worker_spec.rb index fd63af5e4ab7a31316c7c159046e17cc19ded71d..f836180b7191790e94579be117a525f77f6efc38 100644 --- a/ee/spec/workers/clear_shared_runners_minutes_worker_spec.rb +++ b/ee/spec/workers/clear_shared_runners_minutes_worker_spec.rb @@ -147,12 +147,12 @@ 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