Skip to content

Commit

Permalink
Merge pull request #1894 from denny/fix/sidekiq-redis
Browse files Browse the repository at this point in the history
Add explicit sidekiq/redis initializer
  • Loading branch information
denny authored Feb 3, 2025
2 parents b26643e + 186150f commit f54fb71
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# frozen_string_literal: true

# ShinyCMS ~ https://shinycms.org
#
# Copyright 2009-2025 Denny de la Haye ~ https://denny.me
#
# ShinyCMS is free software; you can redistribute it and/or modify it under the terms of the GPL (version 2 or later)

# Configure Redis for Sidekiq

redis_options = { url: ENV['REDIS_URL'] }

redis_options[:ssl_params] = { verify_mode: OpenSSL::SSL::VERIFY_NONE } if ENV['REDIS_VERIFY_MODE'] == 'none'

Sidekiq.configure_server do |config|
# :nocov:
config.redis = redis_options
# :nocov:
end

Sidekiq.configure_client do |config|
config.redis = redis_options
end

0 comments on commit f54fb71

Please sign in to comment.