2018-06-27 03:23:28 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-01-21 07:09:05 -05:00
|
|
|
# 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.
|
2020-02-19 13:09:10 -05:00
|
|
|
class GitGarbageCollectWorker # rubocop:disable Scalability/IdempotentWorker
|
2017-11-28 11:08:30 -05:00
|
|
|
include ApplicationWorker
|
2016-07-08 15:32:58 -04:00
|
|
|
|
2016-10-21 12:13:41 -04:00
|
|
|
sidekiq_options retry: false
|
2019-10-18 07:11:44 -04:00
|
|
|
feature_category :gitaly
|
2020-06-12 08:08:56 -04:00
|
|
|
loggable_arguments 1, 2, 3
|
2016-07-08 15:32:58 -04:00
|
|
|
|
2016-10-27 08:59:52 -04:00
|
|
|
def perform(project_id, task = :gc, lease_key = nil, lease_uuid = nil)
|
2021-01-21 07:09:05 -05:00
|
|
|
::Projects::GitGarbageCollectWorker.new.perform(project_id, task, lease_key, lease_uuid)
|
2016-10-27 08:59:52 -04:00
|
|
|
end
|
2016-07-08 15:32:58 -04:00
|
|
|
end
|