diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-20 09:50:23 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-20 09:50:23 +0000 |
commit | 5d4c627a70247d545ac695665e9ce4d07887e116 (patch) | |
tree | ba9ce2baf16cf7092dcca102862955785ec706d5 /app | |
parent | c6bad18a5a8a66eaa641f5bf0177e3d7015c3cfa (diff) | |
download | gitlab-ce-5d4c627a70247d545ac695665e9ce4d07887e116.tar.gz |
Add latest changes from gitlab-org/gitlab@13-12-stable-ee
Diffstat (limited to 'app')
-rw-r--r-- | app/workers/all_queues.yml | 9 | ||||
-rw-r--r-- | app/workers/git_garbage_collect_worker.rb | 19 |
2 files changed, 28 insertions, 0 deletions
diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml index 07c1ce0d939..b216c2bff28 100644 --- a/app/workers/all_queues.yml +++ b/app/workers/all_queues.yml @@ -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 diff --git a/app/workers/git_garbage_collect_worker.rb b/app/workers/git_garbage_collect_worker.rb new file mode 100644 index 00000000000..a2aab23db7b --- /dev/null +++ b/app/workers/git_garbage_collect_worker.rb @@ -0,0 +1,19 @@ +# 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 |