Commit 7803c691 authored by Mikołaj Wawrzyniak's avatar Mikołaj Wawrzyniak

Merge branch 'id-load_balancing_for_update_all_mirrors_worker' into 'master'

Add data consistency for UpdateAllMirrorsWorker

See merge request gitlab-org/gitlab!64526
parents 5a4ba3d7 8cc47ea7
---
name: load_balancing_for_update_all_mirrors_worker
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64526
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/334162
milestone: '14.1'
type: development
group: group::source code
default_enabled: false
......@@ -7,6 +7,7 @@ class UpdateAllMirrorsWorker # rubocop:disable Scalability/IdempotentWorker
include CronjobQueue
feature_category :source_code_management
data_consistency :sticky, feature_flag: :load_balancing_for_update_all_mirrors_worker
LEASE_TIMEOUT = 5.minutes
SCHEDULE_WAIT_TIMEOUT = 4.minutes
......
......@@ -11,6 +11,11 @@ RSpec.describe UpdateAllMirrorsWorker do
stub_exclusive_lease
end
it_behaves_like 'worker with data consistency',
described_class,
feature_flag: :load_balancing_for_update_all_mirrors_worker,
data_consistency: :sticky
describe '#perform' do
it 'does nothing if the database is read-only' do
allow(Gitlab::Database).to receive(:read_only?).and_return(true)
......
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