implement alternative match-making approach with Lua scripts in Redis

This commit is contained in:
2026-10-25 15:57:24 +03:00
parent 582ecb7c74
commit acdaebd491
19 changed files with 796 additions and 139 deletions
+5 -1
View File
@@ -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