Class: GitlabPerformanceBarStatsWorker
- Inherits:
-
Object
- Object
- GitlabPerformanceBarStatsWorker
- Includes:
- ApplicationWorker
- Defined in:
- app/workers/gitlab_performance_bar_stats_worker.rb
Constant Summary collapse
- LEASE_KEY =
'gitlab:performance_bar_stats'
- LEASE_TIMEOUT =
600
- WORKER_DELAY =
120
- 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_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(lease_uuid) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'app/workers/gitlab_performance_bar_stats_worker.rb', line 20 def perform(lease_uuid) with_redis do |redis| request_ids = fetch_request_ids(redis, lease_uuid) stats = Gitlab::PerformanceBar::Stats.new(redis) request_ids.each do |id| stats.process(id) end end end |