dawarich/config/initializers/sidekiq.rb

25 lines
881 B
Ruby
Raw Normal View History

2024-06-10 13:08:27 -04:00
# frozen_string_literal: true
2025-06-02 14:53:35 -04:00
# Sidekiq.configure_server do |config|
# if ENV['PROMETHEUS_EXPORTER_ENABLED'].to_s == 'true'
# require 'prometheus_exporter/instrumentation'
2025-06-02 14:53:35 -04:00
# # Add middleware for collecting job-level metrics
# config.server_middleware do |chain|
# chain.add PrometheusExporter::Instrumentation::Sidekiq
# end
2025-06-02 14:53:35 -04:00
# # Capture metrics for failed jobs
# config.death_handlers << PrometheusExporter::Instrumentation::Sidekiq.death_handler
2025-06-02 14:53:35 -04:00
# # Start Prometheus instrumentation
# config.on :startup do
# PrometheusExporter::Instrumentation::SidekiqProcess.start
# PrometheusExporter::Instrumentation::SidekiqQueue.start
# PrometheusExporter::Instrumentation::SidekiqStats.start
# end
# end
# end
2025-06-02 14:53:35 -04:00
# Sidekiq::Queue['reverse_geocoding'].limit = 1 if Sidekiq.server? && DawarichSettings.photon_uses_komoot_io?