mirror of
https://github.com/discourse/discourse.git
synced 2024-11-21 16:38:15 -06:00
FEATURE: add setting to bypass sending redis CLIENT commands
Some cloud providers (Google Memorystore) do not support any CLIENT commands By setting :id to nil in the redis config hash we can avoid these commands. This adds a special global setting GCE users can enable: `DISCOURSE_REDIS_SKIP_CLIENT_COMMANDS = true`
This commit is contained in:
parent
8f35fd4595
commit
8b7a2d1cb7
@ -152,6 +152,7 @@ class GlobalSetting
|
||||
c[:password] = redis_password if redis_password.present?
|
||||
c[:db] = redis_db if redis_db != 0
|
||||
c[:db] = 1 if Rails.env == "test"
|
||||
c[:id] = nil if redis_skip_client_commands
|
||||
|
||||
c.freeze
|
||||
end
|
||||
|
@ -117,6 +117,8 @@ redis_db = 0
|
||||
# redis password
|
||||
redis_password =
|
||||
|
||||
# skip configuring client id for cloud providers who support no client commands
|
||||
redis_skip_client_commands = false
|
||||
|
||||
# enable Cross-origin Resource Sharing (CORS) directly at the application level
|
||||
enable_cors = false
|
||||
|
Loading…
Reference in New Issue
Block a user