blob: 80e86fd7814d1d43c374db31bc41cc5804897b05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# frozen_string_literal: true
module HashedStorage
class MigratorWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
data_consistency :always
sidekiq_options retry: 3
queue_namespace :hashed_storage
feature_category :source_code_management
# Gitlab::HashedStorage::Migrator#migration_pending? depends on the
# queue size of this worker.
tags :exclude_from_gitlab_com, :needs_own_queue
# @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_migrate(start: start, finish: finish)
end
end
end
|