Skip to content

Commit aafc67b

Browse files
committed
merge
2 parents fe93f49 + 0237e7d commit aafc67b

3 files changed

Lines changed: 27 additions & 20 deletions

File tree

‎config/settings/base.py‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,14 @@
420420
"URL": env("SOLR_URL", default="http://solr:8983/solr/ocabr/"),
421421
"SILENTLY_FAIL": False,
422422
"SOLR_TIMEOUT": 10,
423-
}
423+
},
424+
'es': {
425+
'ENGINE': 'haystack.backends.elasticsearch7_backend.Elasticsearch7SearchEngine',
426+
'URL': env("ES_URL", default="http://elastic:xxxxx@host.docker.internal:9200/"),
427+
'INDEX_NAME': 'oca',
428+
"SOLR_TIMEOUT": 10,
429+
"KWARGS": {"verify_certs":False}
430+
},
424431
}
425432

426433
USE_SOLR = env.str("USE_SOLR", "True") == "True"

‎config/settings/production.py‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -186,21 +186,21 @@
186186

187187
# Elastic-APM # https://www.elastic.co/guide/en/apm/agent/python/current/django-support.html
188188
# ------------------------------------------------------------------------------
189-
ELASTIC_APM_DISABLE_SEND = env.bool("ELASTIC_APM_DISABLE_SEND", default=True)
190-
191-
INSTALLED_APPS += ["elasticapm.contrib.django"]
192-
193-
ELASTIC_APM = {
194-
# Set the required service name. Allowed characters:
195-
# a-z, A-Z, 0-9, -, _, and space
196-
"SERVICE_NAME": env("ELASTIC_APM_SERVICE_NAME", default="OCABR-SciELO"),
197-
# Use if APM Server requires a secret token
198-
"SECRET_TOKEN": env("ELASTIC_APM_SECRET_TOKEN", default=""),
199-
# Set the custom APM Server URL (default: http://localhost:8200)
200-
"SERVER_URL": env("ELASTIC_APM_SERVER_URL", default="http://siem.scielo.org:8200"),
201-
# Set the service environment
202-
"ENVIRONMENT": env("ELASTIC_APM_ENVIRONMENT", default="produciton"),
203-
}
204-
205-
MIDDLEWARE.insert(0, "elasticapm.contrib.django.middleware.TracingMiddleware")
206-
MIDDLEWARE.insert(1, "elasticapm.contrib.django.middleware.Catch404Middleware")
189+
# ELASTIC_APM_DISABLE_SEND = env.bool("ELASTIC_APM_DISABLE_SEND", default=True)
190+
191+
# INSTALLED_APPS += ["elasticapm.contrib.django"]
192+
193+
# ELASTIC_APM = {
194+
# # Set the required service name. Allowed characters:
195+
# # a-z, A-Z, 0-9, -, _, and space
196+
# "SERVICE_NAME": env("ELASTIC_APM_SERVICE_NAME", default="OCABR-SciELO"),
197+
# # Use if APM Server requires a secret token
198+
# "SECRET_TOKEN": env("ELASTIC_APM_SECRET_TOKEN", default=""),
199+
# # Set the custom APM Server URL (default: http://localhost:8200)
200+
# "SERVER_URL": env("ELASTIC_APM_SERVER_URL", default="http://siem.scielo.org:8200"),
201+
# # Set the service environment
202+
# "ENVIRONMENT": env("ELASTIC_APM_ENVIRONMENT", default="produciton"),
203+
# }
204+
205+
# MIDDLEWARE.insert(0, "elasticapm.contrib.django.middleware.TracingMiddleware")
206+
# MIDDLEWARE.insert(1, "elasticapm.contrib.django.middleware.Catch404Middleware")

‎requirements/base.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ langcodes==3.3.0 # https://pypi.org/project/langcodes/
8787
# ------------------------------------------------------------------------------
8888
pyalex==0.14 # https://github.com/J535D165/pyalex
8989

90-
9190
# ElasticSearch
9291
# ------------------------------------------------------------------------------
9392
elasticsearch==7.17.12 # https://elasticsearch-py.readthedocs.io/en/v7.17.12/
93+

0 commit comments

Comments
 (0)