Remove unnecessary override

parent ce925faa
...@@ -7,22 +7,6 @@ module Projects ...@@ -7,22 +7,6 @@ module Projects
private private
# At the moment this was added, the default key was like this.
# With the addition of wikis to housekeeping, this will bring a
# problem because the wiki for project 1 will have the same
# lease key as project 1.
#
# In the `GitGarbageCollectMethods` we namespaced the resource,
# giving us the option to have different resources. Nevertheless,
# we kept this override in order for backward compatibility and avoid
# starting all projects from scratch.
#
# See https://gitlab.com/gitlab-org/gitlab/-/issues/299903
override :default_lease_key
def default_lease_key(task, resource)
"git_gc:#{task}:#{resource.id}"
end
override :find_resource override :find_resource
def find_resource(id) def find_resource(id)
Project.find(id) Project.find(id)
......
...@@ -9,7 +9,7 @@ RSpec.describe Projects::GitGarbageCollectWorker do ...@@ -9,7 +9,7 @@ RSpec.describe Projects::GitGarbageCollectWorker do
let(:resource) { project } let(:resource) { project }
let(:statistics_service_klass) { Projects::UpdateStatisticsService } let(:statistics_service_klass) { Projects::UpdateStatisticsService }
let(:statistics_keys) { [:repository_size, :lfs_objects_size] } let(:statistics_keys) { [:repository_size, :lfs_objects_size] }
let(:expected_default_lease) { "#{resource.id}" } let(:expected_default_lease) { "projects:#{resource.id}" }
end end
context 'when is able to get the lease' do context 'when is able to get the lease' do
......
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