Commit 827c4349 authored by Imre Farkas's avatar Imre Farkas

Merge branch '346170-increase-jitter-for-AdjournedGroupDeletionWorker' into 'master'

Resolve "Increase jitter for AdjournedGroupDeletionWorker"

See merge request gitlab-org/gitlab!81796
parents a248f37f 67486d27
...@@ -629,7 +629,7 @@ Gitlab.ee do ...@@ -629,7 +629,7 @@ Gitlab.ee do
Settings.cron_jobs['active_user_count_threshold_worker']['cron'] ||= '0 12 * * *' Settings.cron_jobs['active_user_count_threshold_worker']['cron'] ||= '0 12 * * *'
Settings.cron_jobs['active_user_count_threshold_worker']['job_class'] = 'ActiveUserCountThresholdWorker' Settings.cron_jobs['active_user_count_threshold_worker']['job_class'] = 'ActiveUserCountThresholdWorker'
Settings.cron_jobs['adjourned_group_deletion_worker'] ||= Settingslogic.new({}) Settings.cron_jobs['adjourned_group_deletion_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['adjourned_group_deletion_worker']['cron'] ||= '0 3 * * *' Settings.cron_jobs['adjourned_group_deletion_worker']['cron'] ||= '0 2 * * *'
Settings.cron_jobs['adjourned_group_deletion_worker']['job_class'] = 'AdjournedGroupDeletionWorker' Settings.cron_jobs['adjourned_group_deletion_worker']['job_class'] = 'AdjournedGroupDeletionWorker'
Settings.cron_jobs['clear_shared_runners_minutes_worker'] ||= Settingslogic.new({}) Settings.cron_jobs['clear_shared_runners_minutes_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['clear_shared_runners_minutes_worker']['cron'] ||= '0 0 1 * *' Settings.cron_jobs['clear_shared_runners_minutes_worker']['cron'] ||= '0 0 1 * *'
......
...@@ -7,7 +7,7 @@ class AdjournedGroupDeletionWorker # rubocop:disable Scalability/IdempotentWorke ...@@ -7,7 +7,7 @@ class AdjournedGroupDeletionWorker # rubocop:disable Scalability/IdempotentWorke
include CronjobQueue include CronjobQueue
INTERVAL = 10.seconds.to_i INTERVAL = 20.seconds.to_i
feature_category :compliance_management feature_category :compliance_management
......
...@@ -43,13 +43,13 @@ RSpec.describe AdjournedGroupDeletionWorker do ...@@ -43,13 +43,13 @@ RSpec.describe AdjournedGroupDeletionWorker do
worker.perform worker.perform
end end
it 'schedules groups 10 seconds apart' do it 'schedules groups 20 seconds apart' do
group_marked_for_deletion_2 = create(:group_with_deletion_schedule, group_marked_for_deletion_2 = create(:group_with_deletion_schedule,
marked_for_deletion_on: 14.days.ago, marked_for_deletion_on: 14.days.ago,
deleting_user: user) deleting_user: user)
expect(GroupDestroyWorker).to receive(:perform_in).with(0, group_marked_for_deletion.id, user.id) expect(GroupDestroyWorker).to receive(:perform_in).with(0, group_marked_for_deletion.id, user.id)
expect(GroupDestroyWorker).to receive(:perform_in).with(10, group_marked_for_deletion_2.id, user.id) expect(GroupDestroyWorker).to receive(:perform_in).with(20, group_marked_for_deletion_2.id, user.id)
worker.perform worker.perform
end 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