Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
gitnnolabs committed Dec 9, 2024
2 parents fe93f49 + 0237e7d commit aafc67b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
9 changes: 8 additions & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,14 @@
"URL": env("SOLR_URL", default="http://solr:8983/solr/ocabr/"),
"SILENTLY_FAIL": False,
"SOLR_TIMEOUT": 10,
}
},
'es': {
'ENGINE': 'haystack.backends.elasticsearch7_backend.Elasticsearch7SearchEngine',
'URL': env("ES_URL", default="http://elastic:[email protected]:9200/"),
'INDEX_NAME': 'oca',
"SOLR_TIMEOUT": 10,
"KWARGS": {"verify_certs":False}
},
}

USE_SOLR = env.str("USE_SOLR", "True") == "True"
Expand Down
36 changes: 18 additions & 18 deletions config/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,21 +186,21 @@

# Elastic-APM # https://www.elastic.co/guide/en/apm/agent/python/current/django-support.html
# ------------------------------------------------------------------------------
ELASTIC_APM_DISABLE_SEND = env.bool("ELASTIC_APM_DISABLE_SEND", default=True)

INSTALLED_APPS += ["elasticapm.contrib.django"]

ELASTIC_APM = {
# Set the required service name. Allowed characters:
# a-z, A-Z, 0-9, -, _, and space
"SERVICE_NAME": env("ELASTIC_APM_SERVICE_NAME", default="OCABR-SciELO"),
# Use if APM Server requires a secret token
"SECRET_TOKEN": env("ELASTIC_APM_SECRET_TOKEN", default=""),
# Set the custom APM Server URL (default: http://localhost:8200)
"SERVER_URL": env("ELASTIC_APM_SERVER_URL", default="http://siem.scielo.org:8200"),
# Set the service environment
"ENVIRONMENT": env("ELASTIC_APM_ENVIRONMENT", default="produciton"),
}

MIDDLEWARE.insert(0, "elasticapm.contrib.django.middleware.TracingMiddleware")
MIDDLEWARE.insert(1, "elasticapm.contrib.django.middleware.Catch404Middleware")
# ELASTIC_APM_DISABLE_SEND = env.bool("ELASTIC_APM_DISABLE_SEND", default=True)

# INSTALLED_APPS += ["elasticapm.contrib.django"]

# ELASTIC_APM = {
# # Set the required service name. Allowed characters:
# # a-z, A-Z, 0-9, -, _, and space
# "SERVICE_NAME": env("ELASTIC_APM_SERVICE_NAME", default="OCABR-SciELO"),
# # Use if APM Server requires a secret token
# "SECRET_TOKEN": env("ELASTIC_APM_SECRET_TOKEN", default=""),
# # Set the custom APM Server URL (default: http://localhost:8200)
# "SERVER_URL": env("ELASTIC_APM_SERVER_URL", default="http://siem.scielo.org:8200"),
# # Set the service environment
# "ENVIRONMENT": env("ELASTIC_APM_ENVIRONMENT", default="produciton"),
# }

# MIDDLEWARE.insert(0, "elasticapm.contrib.django.middleware.TracingMiddleware")
# MIDDLEWARE.insert(1, "elasticapm.contrib.django.middleware.Catch404Middleware")
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ langcodes==3.3.0 # https://pypi.org/project/langcodes/
# ------------------------------------------------------------------------------
pyalex==0.14 # https://github.com/J535D165/pyalex


# ElasticSearch
# ------------------------------------------------------------------------------
elasticsearch==7.17.12 # https://elasticsearch-py.readthedocs.io/en/v7.17.12/

0 comments on commit aafc67b

Please sign in to comment.