Commit 518af7f2 authored by Francisco Javier López's avatar Francisco Javier López Committed by charlie ablett

Remove old compatibility class GitGarbageCollectWorker

parent 64cc235e
......@@ -2107,15 +2107,6 @@
:idempotent: true
:tags:
- :exclude_from_kubernetes
- :name: git_garbage_collect
:worker_name: GitGarbageCollectWorker
:feature_category: :gitaly
:has_external_dependencies:
:urgency: :low
:resource_boundary: :unknown
:weight: 1
:idempotent:
:tags: []
- :name: github_import_advance_stage
:worker_name: Gitlab::GithubImport::AdvanceStageWorker
:feature_category: :importers
......
# frozen_string_literal: true
# According to our docs, we can only remove workers on major releases
# https://docs.gitlab.com/ee/development/sidekiq_style_guide.html#removing-workers.
#
# We need to still maintain this until 14.0 but with the current functionality.
#
# In https://gitlab.com/gitlab-org/gitlab/-/issues/299290 we track that removal.
class GitGarbageCollectWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: false
feature_category :gitaly
loggable_arguments 1, 2, 3
def perform(project_id, task = :gc, lease_key = nil, lease_uuid = nil)
::Projects::GitGarbageCollectWorker.new.perform(project_id, task, lease_key, lease_uuid)
end
end
......@@ -152,8 +152,6 @@
- 1
- - geo
- 1
- - git_garbage_collect
- 1
- - github_import_advance_stage
- 1
- - github_importer
......
# frozen_string_literal: true
require 'fileutils'
require 'spec_helper'
RSpec.describe GitGarbageCollectWorker do
let_it_be(:project) { create(:project, :repository) }
let(:lease_uuid) { SecureRandom.uuid }
let(:lease_key) { "project_housekeeping:#{project.id}" }
let(:task) { :full_repack }
let(:params) { [project.id, task, lease_key, lease_uuid] }
subject { described_class.new }
describe "#perform" do
it 'calls the Projects::GitGarbageGitGarbageCollectWorker with the same params' do
expect_next_instance_of(Projects::GitGarbageCollectWorker) do |instance|
expect(instance).to receive(:perform).with(*params)
end
subject.perform(*params)
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