Skip to content

Commit 2c5c2d6

Browse files
Raise Redis timeout to handle Heroku...
1 parent 08188fb commit 2c5c2d6

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

config/initializers/sidekiq.rb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
redis = {
2+
url: ENV["REDIS_URL"], timeout: 10.seconds,
3+
ssl_params: {verify_mode: OpenSSL::SSL::VERIFY_NONE}
4+
}
5+
16
Sidekiq.configure_server do |config|
2-
config.redis = {
3-
url: ENV["REDIS_URL"],
4-
ssl_params: {verify_mode: OpenSSL::SSL::VERIFY_NONE}
5-
}
7+
config.redis = redis
68

79
config.capsule("AWS SES") do |capsule| # avoid rate limits
810
Rails.configuration.action_mailer.deliver_later_queue_name = "SES"
@@ -12,8 +14,5 @@
1214
end
1315

1416
Sidekiq.configure_client do |config|
15-
config.redis = {
16-
url: ENV["REDIS_URL"],
17-
ssl_params: {verify_mode: OpenSSL::SSL::VERIFY_NONE}
18-
}
17+
config.redis = redis
1918
end

0 commit comments

Comments
 (0)