debian-mirror-gitlab/app/workers/hashed_storage/rollbacker_worker.rb

26 lines
719 B
Ruby
Raw Normal View History

2019-07-07 11:18:12 +05:30
# frozen_string_literal: true
module HashedStorage
2020-04-08 14:13:33 +05:30
class RollbackerWorker # rubocop:disable Scalability/IdempotentWorker
2019-07-07 11:18:12 +05:30
include ApplicationWorker
2021-10-27 15:23:28 +05:30
data_consistency :always
2021-06-08 01:23:25 +05:30
sidekiq_options retry: 3
2019-07-07 11:18:12 +05:30
queue_namespace :hashed_storage
2019-12-21 20:55:43 +05:30
feature_category :source_code_management
2021-10-27 15:23:28 +05:30
# Gitlab::HashedStorage::Migrator#rollback_pending? depends on the
# queue size of this worker.
tags :exclude_from_gitlab_com, :needs_own_queue
2019-07-07 11:18:12 +05:30
# @param [Integer] start initial ID of the batch
# @param [Integer] finish last ID of the batch
def perform(start, finish)
migrator = Gitlab::HashedStorage::Migrator.new
migrator.bulk_rollback(start: start, finish: finish)
end
end
end