schon/evibes/settings/elasticsearch.py
Egor fureunoir Gorbunov 87c355474c Features: 1) Enable Elasticsearch DSL autosync and switch to CelerySignalProcessor; 2) Extract common logic into auto_resolver_helper for resolving brands and categories; 3) Add conditional CACHEOPS_ENABLED based on sys arguments;
Fixes: 1) Add missing sys import in caches.py; 2) Ensure CACHEOPS_REDIS is only declared when CACHEOPS_ENABLED is True;

Extra: 1) Formatting and cleanup for readability in settings and auto-resolve methods; 2) Rearrange cacheops import in base settings;
2025-05-13 02:09:10 +03:00

16 lines
458 B
Python

from evibes.settings.base import * # noqa: F403
ELASTICSEARCH_DSL = {
'default': {
'hosts': ['http://elasticsearch:9200'],
'basic_auth': ('elastic', getenv("ELASTIC_PASSWORD")), # noqa: F405
'verify_certs': False,
'ssl_show_warn': False,
},
}
ELASTICSEARCH_DSL_AUTOSYNC = True
ELASTICSEARCH_DSL_PARALLEL = False
ELASTICSEARCH_DSL_SIGNAL_PROCESSOR = (
"django_elasticsearch_dsl.signals.CelerySignalProcessor"
)