2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

PERF: Use Redis SET EX GET instead of LUA script for counting (#15939)

This will prevent Discourse from booting on Redis < 6.2.0
This commit is contained in:
Rafael dos Santos Silva 2022-02-15 10:36:07 -03:00 committed by GitHub
parent a48231041b
commit 4d3da70bc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 14 deletions

View file

@ -8,3 +8,8 @@ end
# Pending https://github.com/MiniProfiler/rack-mini-profiler/pull/450 and
# upgrade to Sidekiq 6.1
Redis.exists_returns_integer = true
if Gem::Version.new(Discourse.redis.info['redis_version']) < Gem::Version.new("6.2.0")
STDERR.puts "Discourse requires Redis 6.2.0 or up"
exit 1
end