Commit 70289eea authored by Max Woolf's avatar Max Woolf

Shorten spacing interval between deleted groups

Similar to this issue and MR:

MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35046
Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/212645

Groups are also scheduled for deletion with a 5 minute
gap between them which is causing a large backlog
in groups/namespaces in QA runs.
parent f1c813d4
......@@ -4,7 +4,7 @@ class AdjournedGroupDeletionWorker # rubocop:disable Scalability/IdempotentWorke
include ApplicationWorker
include CronjobQueue
INTERVAL = 5.minutes.to_i
INTERVAL = 10.seconds.to_i
feature_category :authentication_and_authorization
......
......@@ -42,5 +42,16 @@ RSpec.describe AdjournedGroupDeletionWorker do
worker.perform
end
it 'schedules groups 10 seconds apart' do
group_marked_for_deletion_2 = create(:group_with_deletion_schedule,
marked_for_deletion_on: 14.days.ago,
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(10, group_marked_for_deletion_2.id, user.id)
worker.perform
end
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