simplify redis config to use REDIS_URL only

This commit is contained in:
Justin Edmund 2025-11-30 20:24:29 -08:00
parent 8aedb36fac
commit 5547c2b4b8

View file

@ -1,9 +1,2 @@
# Fetch environment variables with defaults if not set
redis_url = ENV.fetch('REDIS_URL', 'redis://localhost')
redis_port = ENV.fetch('REDISPORT', '6379')
# Combine URL and port (adjust the path/DB as needed)
full_redis_url = "#{redis_url}/0"
# Initialize Redis using the constructed URL
$redis = Redis.new(url: full_redis_url)
redis_url = ENV.fetch('REDIS_URL', 'redis://localhost:6379/0')
$redis = Redis.new(url: redis_url)