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
5d4c627a
Commit
5d4c627a
authored
May 20, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@13-12-stable-ee
parent
c6bad18a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
0 deletions
+56
-0
app/workers/all_queues.yml
app/workers/all_queues.yml
+9
-0
app/workers/git_garbage_collect_worker.rb
app/workers/git_garbage_collect_worker.rb
+19
-0
config/sidekiq_queues.yml
config/sidekiq_queues.yml
+2
-0
spec/workers/git_garbage_collect_worker_spec.rb
spec/workers/git_garbage_collect_worker_spec.rb
+26
-0
No files found.
app/workers/all_queues.yml
View file @
5d4c627a
...
...
@@ -2116,6 +2116,15 @@
: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
...
...
app/workers/git_garbage_collect_worker.rb
0 → 100644
View file @
5d4c627a
# 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
config/sidekiq_queues.yml
View file @
5d4c627a
...
...
@@ -152,6 +152,8 @@
-
1
-
-
geo
-
1
-
-
git_garbage_collect
-
1
-
-
github_import_advance_stage
-
1
-
-
github_importer
...
...
spec/workers/git_garbage_collect_worker_spec.rb
0 → 100644
View file @
5d4c627a
# 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
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