Moved from misused constants to class variables in MetricsCollector, MetricsCollector is no longer initialized as a singleton

This commit is contained in:
wint3rmute
2023-07-20 20:16:15 +02:00
committed by Mateusz Bączek
parent 9db6eb058c
commit 8d4c16c79c
3 changed files with 20 additions and 22 deletions

View File

@@ -170,7 +170,7 @@ end
if CONFIG.statistics_enabled
Invidious::Jobs.register Invidious::Jobs::StatisticsRefreshJob.new(PG_DB, SOFTWARE)
add_handler Metrics::METRICS_COLLECTOR
add_handler Metrics::RouteMetricsCollector.new
end
if (CONFIG.use_pubsub_feeds.is_a?(Bool) && CONFIG.use_pubsub_feeds.as(Bool)) || (CONFIG.use_pubsub_feeds.is_a?(Int32) && CONFIG.use_pubsub_feeds.as(Int32) > 0)