Commit 8eef7109 authored by David Fernandez's avatar David Fernandez

Merge branch 'mc/backstage/spread-shared-runner-minute-reset-8-hours' into 'master'

Spread shared runner minute reset to 8h

See merge request gitlab-org/gitlab!55802
parents de24bd13 d0552a14
......@@ -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
......
---
title: Spread shared runner minute reset to 8h.
merge_request: 55802
author:
type: performance
......@@ -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