Commit fab6b3a8 authored by nmilojevic1's avatar nmilojevic1 Committed by Nikola Milojevic

Remove delayed_perform_for_build_hooks_worker feature flag

Changelog: other
MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62196
parent bfe2457a
......@@ -11,16 +11,6 @@ class BuildHooksWorker # rubocop:disable Scalability/IdempotentWorker
urgency :high
data_consistency :delayed, feature_flag: :load_balancing_for_build_hooks_worker
DATA_CONSISTENCY_DELAY = 3
def self.perform_async(*args)
if Feature.enabled?(:delayed_perform_for_build_hooks_worker, default_enabled: :yaml)
perform_in(DATA_CONSISTENCY_DELAY.seconds, *args)
else
super
end
end
# rubocop: disable CodeReuse/ActiveRecord
def perform(build_id)
Ci::Build.includes({ runner: :tags })
......
---
name: delayed_perform_for_build_hooks_worker
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61149
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/330132
milestone: '13.12'
type: development
group: group::memory
default_enabled: false
......@@ -24,20 +24,8 @@ RSpec.describe BuildHooksWorker do
end
describe '.perform_async' do
context 'when delayed_perform_for_build_hooks_worker feature flag is disabled' do
before do
stub_feature_flags(delayed_perform_for_build_hooks_worker: false)
end
it 'delays scheduling a job by calling perform_in with default delay' do
expect(described_class).to receive(:perform_in).with(ApplicationWorker::DEFAULT_DELAY_INTERVAL.second, 123)
described_class.perform_async(123)
end
end
it 'delays scheduling a job by calling perform_in' do
expect(described_class).to receive(:perform_in).with(described_class::DATA_CONSISTENCY_DELAY.second, 123)
it 'delays scheduling a job by calling perform_in with default delay' do
expect(described_class).to receive(:perform_in).with(ApplicationWorker::DEFAULT_DELAY_INTERVAL.second, 123)
described_class.perform_async(123)
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