Skip to content

Commit

Permalink
Fix redis instance
Browse files Browse the repository at this point in the history
  • Loading branch information
antoalconti committed Oct 22, 2024
1 parent 080fa29 commit 44451a4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
8 changes: 6 additions & 2 deletions config/initializers/rails_performance.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
if defined?(RailsPerformance)
RailsPerformance.setup do |config|
config.redis = Redis.new(url: ENV.fetch('REDIS_PERFORMANCE_URL') { 'redis://localhost:6379/1' })
config.redis = Redis.new(
url: ENV.fetch('REDIS_PERFORMANCE_URL') { 'redis://localhost:6379/1' },
ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }
)
config.duration = 4.hours
config.enabled = true
config.enabled = true

if Rails.env.production?
config.http_basic_authentication_enabled = true
config.http_basic_authentication_user_name = ENV.fetch('PERFORMANCE_USERNAME')
Expand Down
14 changes: 12 additions & 2 deletions config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
Sidekiq.configure_client do |config|
config.redis = { url: ENV.fetch('REDIS_URL') { 'redis://localhost:6379/1' }, size: 1, network_timeout: 5 }
config.redis = {
url: ENV.fetch('REDIS_URL') { 'redis://localhost:6379/1' },
size: 1,
network_timeout: 5,
ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }
}
end

Sidekiq.configure_server do |config|
config.redis = { url: ENV.fetch('REDIS_URL') { 'redis://localhost:6379/1' }, size: 12, network_timeout: 5 }
config.redis = {
url: ENV.fetch('REDIS_URL') { 'redis://localhost:6379/1' },
size: 12,
network_timeout: 5,
ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }
}
end

schedule_file = 'config/schedule.yml'
Expand Down

0 comments on commit 44451a4

Please sign in to comment.