mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
In rare cases where Redis is being updated/restarted while a job is running, this should add some flexibility.
12 lines
348 B
Ruby
12 lines
348 B
Ruby
if Rails.env.production? || Rails.env.staging?
|
|
redis_jobs_url = ENV.fetch("OFN_REDIS_JOBS_URL", "redis://localhost:6381/0")
|
|
|
|
Sidekiq.configure_server do |config|
|
|
config.redis = { url: redis_jobs_url, network_timeout: 5 }
|
|
end
|
|
|
|
Sidekiq.configure_client do |config|
|
|
config.redis = { url: redis_jobs_url, network_timeout: 5 }
|
|
end
|
|
end
|