Class: GitlabPerformanceBarStatsWorker
- Inherits:
-
Object
- Object
- GitlabPerformanceBarStatsWorker
- Includes:
- ApplicationWorker, CronjobQueue
- Defined in:
- app/workers/gitlab_performance_bar_stats_worker.rb
Constant Summary collapse
- STATS_KEY =
'performance_bar_stats:pending_request_ids'- STATS_KEY_EXPIRE =
30.minutes.to_i
Constants included from ApplicationWorker
ApplicationWorker::LOGGING_EXTRA_KEY, ApplicationWorker::SAFE_PUSH_BULK_LIMIT
Constants included from Gitlab::Loggable
Constants included from WorkerAttributes
WorkerAttributes::DEFAULT_CONCURRENCY_LIMIT_PERCENTAGE_BY_URGENCY, 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
-
#perform(_uuid = nil) ⇒ Object
_uuid is kept for backward compatibility, but it’s not used anymore.
Methods included from Gitlab::Loggable
Methods included from Gitlab::SidekiqVersioning::Worker
Methods included from WorkerContext
Instance Method Details
#perform(_uuid = nil) ⇒ Object
_uuid is kept for backward compatibility, but it’s not used anymore
19 20 21 22 23 24 25 26 27 28 |
# File 'app/workers/gitlab_performance_bar_stats_worker.rb', line 19 def perform(_uuid = nil) with_redis do |redis| request_ids = fetch_request_ids(redis) stats = Gitlab::PerformanceBar::Stats.new(redis) request_ids.each do |id| stats.process(id) end end end |