avoid unnecessary initialization for certain scenarios

This commit is contained in:
Alex Barcelo 2024-12-02 10:54:48 +01:00
parent f94ea5516e
commit e23d4ba382
No known key found for this signature in database
GPG key ID: 54301A25EEC2CF19

View file

@ -25,4 +25,6 @@ Sidekiq.configure_client do |config|
config.redis = { url: ENV['REDIS_URL'] }
end
Sidekiq::Queue['reverse_geocoding'].limit = 1 if PHOTON_API_HOST == 'photon.komoot.io'
if (defined?(Rails::Server) || Sidekiq.server?) && PHOTON_API_HOST == 'photon.komoot.io'
Sidekiq::Queue['reverse_geocoding'].limit = 1
end