Skip to content

Commit 1b5108b

Browse files
committed
🔧 allow setting multiple elasticsearch hosts via env
1 parent 65d9c89 commit 1b5108b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎froide/settings.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,9 @@ def STATICFILES_DIRS(self):
481481
# ######## Search ###########
482482

483483
ELASTICSEARCH_INDEX_PREFIX = "froide"
484-
ELASTICSEARCH_HOST = values.Value("localhost")
484+
ELASTICSEARCH_HOSTS = values.ListValue(["http://localhost:9200"])
485485
ELASTICSEARCH_DSL = {
486-
"default": {"hosts": "http://%s:9200" % ELASTICSEARCH_HOST},
486+
"default": {"hosts": ELASTICSEARCH_HOSTS},
487487
}
488488
ELASTICSEARCH_DSL_SIGNAL_PROCESSOR = (
489489
"django_elasticsearch_dsl.signals.RealTimeSignalProcessor"

0 commit comments

Comments
 (0)