Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
64138635
Commit
64138635
authored
Feb 02, 2021
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary override
parent
ce925faa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
17 deletions
+1
-17
app/workers/projects/git_garbage_collect_worker.rb
app/workers/projects/git_garbage_collect_worker.rb
+0
-16
spec/workers/projects/git_garbage_collect_worker_spec.rb
spec/workers/projects/git_garbage_collect_worker_spec.rb
+1
-1
No files found.
app/workers/projects/git_garbage_collect_worker.rb
View file @
64138635
...
@@ -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
)
...
...
spec/workers/projects/git_garbage_collect_worker_spec.rb
View file @
64138635
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment