implement alternative match-making approach with Lua scripts in Redis
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
# Development/test: localhost:6379 (default)
|
||||
# Production: set REDIS_URL env variable, e.g. redis://redis.example.com:6379/0
|
||||
|
||||
# Use an isolated Redis logical database in tests to avoid clobbering dev data.
|
||||
url = ENV.fetch("REDIS_URL", "redis://localhost:6380/0")
|
||||
url = url.sub(%r{/\d+$}, "/15") if Rails.env.test?
|
||||
|
||||
RedisConnection = ConnectionPool.new(size: 5, timeout: 5) do
|
||||
Redis.new(url: ENV.fetch("REDIS_URL", "redis://localhost:6380/0"))
|
||||
Redis.new(url: url)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user