Move metrics handler registration together with the rest of handlers, into invidious.cr

This commit is contained in:
wint3rmute 2023-07-20 19:36:22 +02:00 committed by Mateusz Bączek
parent 27dd94f60d
commit 8456f8d4cd
2 changed files with 1 additions and 1 deletions

View File

@ -170,6 +170,7 @@ end
if CONFIG.statistics_enabled
Invidious::Jobs.register Invidious::Jobs::StatisticsRefreshJob.new(PG_DB, SOFTWARE)
add_handler Metrics::METRICS_COLLECTOR
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)

View File

@ -311,7 +311,6 @@ module Invidious::Routing
# Misc
get "/api/v1/stats", {{namespace}}::Misc, :stats
if CONFIG.statistics_enabled
add_handler Metrics::METRICS_COLLECTOR
get "/api/v1/metrics", {{namespace}}::Misc, :metrics
end
get "/api/v1/playlists/:plid", {{namespace}}::Misc, :get_playlist