Skip to content

Commit

Permalink
add logging to verify redis initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashhas committed Oct 29, 2024
1 parent fceab2e commit a63a74f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion config/initializers/redis.rb
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
$redis = Redis.new(url: ENV["REDIS_URL"], ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE })
$redis = Redis.new(url: ENV['REDIS_URL'], ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE })
Rails.logger.info("Redis initializer is being loaded")
Rails.logger.info("Redis URL: #{$redis.client.options[:url]}")
Rails.logger.info("SSL Params: #{$redis.client.options[:ssl_params]}")
begin
Rails.logger.info("Redis PING: #{$redis.ping}")
rescue StandardError => e
Rails.logger.error("Redis connection failed: #{e.message}")
end
Rails.logger.info("REDIS_URL: #{ENV['REDIS_URL']}")

0 comments on commit a63a74f

Please sign in to comment.