Class: Ci::Catalog::Resources::AggregateLast30DayUsageWorker
- Inherits:
-
Object
- Object
- Ci::Catalog::Resources::AggregateLast30DayUsageWorker
- Includes:
- ApplicationWorker, CronjobQueue
- Defined in:
- app/workers/ci/catalog/resources/aggregate_last30_day_usage_worker.rb
Overview
This worker can be called multiple times simultaneously but only one can process data at a time. This is ensured by an exclusive lease guard in ‘Gitlab::Ci::Components::Usages::Aggregator`. The scheduling frequency should be == `Gitlab::Ci::Components::Usages::Aggregator::MAX_RUNTIME` so there is no time gap between job runs.
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 Method Summary collapse
Methods included from Gitlab::Loggable
Methods included from Gitlab::SidekiqVersioning::Worker
Methods included from WorkerContext
Instance Method Details
#perform ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'app/workers/ci/catalog/resources/aggregate_last30_day_usage_worker.rb', line 23 def perform response = Ci::Catalog::Resources::AggregateLast30DayUsageService.new.execute ( status: response.status, message: response., **response.payload ) end |