Features: 1) Add support for multiple Elasticsearch hosts with enhanced configurations; 2) Enable sniffing parameters for cluster discovery and failover handling; 3) Introduce Celery-based signal processor for Elasticsearch synchronization.
Fixes: 1) Correct `http_auth` parameter to replace deprecated `basic_auth`. Extra: 1) Update default Elasticsearch configuration values; 2) Modify `ELASTICSEARCH_DSL_AUTOSYNC` to reflect debug mode; 3) General cleanup and parameter refinements.
This commit is contained in:
parent
a91ba0c41a
commit
4e6d0a9bab
1 changed files with 11 additions and 5 deletions
|
|
@ -2,13 +2,19 @@ from evibes.settings.base import * # noqa: F403
|
|||
|
||||
ELASTICSEARCH_DSL = {
|
||||
"default": {
|
||||
"hosts": ["http://elasticsearch:9200"],
|
||||
"basic_auth": ("elastic", getenv("ELASTIC_PASSWORD")), # noqa: F405
|
||||
"hosts": ["https://es1.example.com:9200", "https://es2.example.com:9200"],
|
||||
"http_auth": ("elastic", getenv("ELASTIC_PASSWORD")), # noqa: F405
|
||||
"verify_certs": False,
|
||||
"timeout": 30,
|
||||
"ssl_show_warn": False,
|
||||
"max_retries": 3,
|
||||
"retry_on_timeout": True,
|
||||
"sniff_on_start": True,
|
||||
"sniff_on_connection_fail": True,
|
||||
"sniffer_timeout": 60,
|
||||
},
|
||||
}
|
||||
|
||||
ELASTICSEARCH_DSL_AUTOSYNC = True
|
||||
ELASTICSEARCH_DSL_PARALLEL = False
|
||||
ELASTICSEARCH_DSL_SIGNAL_PROCESSOR = "evibes.signal_processors.SelectiveSignalProcessor"
|
||||
ELASTICSEARCH_DSL_AUTOSYNC = DEBUG # noqa: F405
|
||||
ELASTICSEARCH_DSL_PARALLEL = True
|
||||
ELASTICSEARCH_DSL_SIGNAL_PROCESSOR = "django_elasticsearch_dsl.signals.CelerySignalProcessor"
|
||||
|
|
|
|||
Loading…
Reference in a new issue