Module: UpdateRepositoryStorageWorker
- Extended by:
- ActiveSupport::Concern
- Includes:
- ApplicationWorker
- Defined in:
- app/workers/concerns/update_repository_storage_worker.rb
Constant Summary
Constants included from ApplicationWorker
ApplicationWorker::LOGGING_EXTRA_KEY, ApplicationWorker::SAFE_PUSH_BULK_LIMIT
Constants included from Gitlab::Loggable
Constants included from WorkerAttributes
WorkerAttributes::DEFAULT_DATA_CONSISTENCY, WorkerAttributes::DEFAULT_DEFER_DELAY, WorkerAttributes::NAMESPACE_WEIGHTS, WorkerAttributes::VALID_DATA_CONSISTENCIES, WorkerAttributes::VALID_RESOURCE_BOUNDARIES, WorkerAttributes::VALID_URGENCIES
Instance Method Summary collapse
Methods included from Gitlab::Loggable
Methods included from Gitlab::SidekiqVersioning::Worker
Methods included from WorkerContext
Instance Method Details
#perform(container_id, new_repository_storage_key, repository_storage_move_id = nil) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/workers/concerns/update_repository_storage_worker.rb', line 14 def perform(container_id, new_repository_storage_key, repository_storage_move_id = nil) repository_storage_move = if repository_storage_move_id find_repository_storage_move(repository_storage_move_id) else # maintain compatibility with workers queued before release container = find_container(container_id) container.repository_storage_moves.create!( source_storage_name: container.repository_storage, destination_storage_name: new_repository_storage_key ) end update_repository_storage(repository_storage_move) end |