Class: CleanupContainerRepositoryWorker
- Inherits:
-
Object
- Object
- CleanupContainerRepositoryWorker
- Includes:
- ApplicationWorker
- Defined in:
- app/workers/cleanup_container_repository_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_DATA_CONSISTENCY_PER_DB, WorkerAttributes::DEFAULT_DEFER_DELAY, WorkerAttributes::LOAD_BALANCED_DATA_CONSISTENCIES, WorkerAttributes::NAMESPACE_WEIGHTS, WorkerAttributes::VALID_DATA_CONSISTENCIES, WorkerAttributes::VALID_RESOURCE_BOUNDARIES, WorkerAttributes::VALID_URGENCIES
Instance Attribute Summary collapse
-
#container_repository ⇒ Object
readonly
Returns the value of attribute container_repository.
-
#current_user ⇒ Object
readonly
Returns the value of attribute current_user.
Instance Method Summary collapse
Methods included from Gitlab::Loggable
Methods included from Gitlab::SidekiqVersioning::Worker
Methods included from WorkerContext
Instance Attribute Details
#container_repository ⇒ Object (readonly)
Returns the value of attribute container_repository.
17 18 19 |
# File 'app/workers/cleanup_container_repository_worker.rb', line 17 def container_repository @container_repository end |
#current_user ⇒ Object (readonly)
Returns the value of attribute current_user.
17 18 19 |
# File 'app/workers/cleanup_container_repository_worker.rb', line 17 def current_user @current_user end |
Instance Method Details
#perform(current_user_id, container_repository_id, params) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/workers/cleanup_container_repository_worker.rb', line 19 def perform(current_user_id, container_repository_id, params) @current_user = User.find_by_id(current_user_id) @container_repository = ContainerRepository.find_by_id(container_repository_id) @params = params return unless valid? Projects::ContainerRepository::CleanupTagsService .new(container_repository: container_repository, current_user: current_user, params: params) .execute end |