Change REDIS_NAMESPACE
deprecation warning to an error (#34664)
This commit is contained in:
parent
b709ef8ac3
commit
5ec840a32f
1 changed files with 5 additions and 3 deletions
|
@ -3,14 +3,16 @@
|
|||
if ENV['REDIS_NAMESPACE']
|
||||
es_configured = ENV['ES_ENABLED'] == 'true' || ENV.fetch('ES_HOST', 'localhost') != 'localhost' || ENV.fetch('ES_PORT', '9200') != '9200' || ENV.fetch('ES_PASS', 'password') != 'password'
|
||||
|
||||
warn <<~MESSAGE
|
||||
WARNING: the REDIS_NAMESPACE environment variable is deprecated and will be removed in Mastodon 4.4.0.
|
||||
message = <<~MESSAGE
|
||||
ERROR: the REDIS_NAMESPACE environment variable is no longer supported, and a migration is required.
|
||||
|
||||
Please see documentation at https://github.com/mastodon/redis_namespace_migration
|
||||
MESSAGE
|
||||
|
||||
warn <<~MESSAGE if es_configured && !ENV['ES_PREFIX']
|
||||
message += <<~MESSAGE if es_configured && !ENV['ES_PREFIX']
|
||||
|
||||
In addition, as REDIS_NAMESPACE is being used as a prefix for Elasticsearch, please do not forget to set ES_PREFIX to "#{ENV.fetch('REDIS_NAMESPACE')}".
|
||||
MESSAGE
|
||||
|
||||
abort message
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue