mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-23 05:28:53 +00:00
Add network timeouts
In rare cases where Redis is being updated/restarted while a job is running, this should add some flexibility.
This commit is contained in:
@@ -2,10 +2,10 @@ 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 }
|
||||
config.redis = { url: redis_jobs_url, network_timeout: 5 }
|
||||
end
|
||||
|
||||
Sidekiq.configure_client do |config|
|
||||
config.redis = { url: redis_jobs_url }
|
||||
config.redis = { url: redis_jobs_url, network_timeout: 5 }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user