Skip to content

Commit

Permalink
Fix SSL Error since Redis 7.0.15
Browse files Browse the repository at this point in the history
Since the following update, SSL connection has been required.
```
heroku-redis: Update REDIS by heroku-redis
Oct 16 at 5:30 AM · v714 · Roll back to here
```

However, Heroku requires verify mode is none.
- https://devcenter.heroku.com/articles/connecting-heroku-redis#connecting-in-ruby
- https://help.heroku.com/HC0F8CUS/heroku-key-value-store-connection-issues
  • Loading branch information
tricknotes committed Oct 21, 2024
1 parent c0d2857 commit 84aa01b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions app/models/daily_mail_scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,17 @@ def scheduled_users
private

def redis
@redis ||= begin
RedisClient.config(url: Settings.redis_url).new_client
end
@redis ||=
begin
config = RedisClient.config(
url: Settings.redis_url,
ssl_params: {
verify_mode: OpenSSL::SSL::VERIFY_NONE
}
)

config.new_client
end
end

def status_for_user(user)
Expand Down

0 comments on commit 84aa01b

Please sign in to comment.