mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
This means old cache entries will be automatically removed instead of perpetually filling up the local Redis instance in dev.
16 lines
394 B
Ruby
16 lines
394 B
Ruby
# Redis connection configuration for Sidekiq
|
|
|
|
redis_connection_settings = {
|
|
url: ENV.fetch("OFN_REDIS_JOBS_URL", "redis://localhost:6381/0"),
|
|
network_timeout: 5,
|
|
expires_in: Rails.env.development? ? 90.minutes : nil
|
|
}
|
|
|
|
Sidekiq.configure_server do |config|
|
|
config.redis = redis_connection_settings
|
|
end
|
|
|
|
Sidekiq.configure_client do |config|
|
|
config.redis = redis_connection_settings
|
|
end
|