Skip to content

Commit

Permalink
Revert "- overwrite for test purpose"
Browse files Browse the repository at this point in the history
This reverts commit 633cf6a.
  • Loading branch information
elipe17 committed Aug 1, 2024
1 parent 563c8dc commit 6e9369b
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions tdrs-backend/tdpservice/settings/cloudgov.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,30 +126,25 @@ class CloudGov(Common):
AWS_HEADERS = {
"Cache-Control": "max-age=86400, s-maxage=86400, must-revalidate",
}
# # The following variables are used to configure the Django Elasticsearch
# es_access_key = cloudgov_services['aws-elasticsearch'][0]['credentials']['access_key']
# es_secret_key = cloudgov_services['aws-elasticsearch'][0]['credentials']['secret_key']
# es_host = cloudgov_services['aws-elasticsearch'][0]['credentials']['uri']

# awsauth = AWS4Auth(
# es_access_key,
# es_secret_key,
# 'us-gov-west-1',
# 'es'
# )

# # Elastic
# ELASTICSEARCH_DSL = {
# 'default': {
# 'hosts': es_host,
# 'http_auth': awsauth,
# 'use_ssl': True,
# 'connection_class': RequestsHttpConnection,
# },
# }
# The following variables are used to configure the Django Elasticsearch
es_access_key = cloudgov_services['aws-elasticsearch'][0]['credentials']['access_key']
es_secret_key = cloudgov_services['aws-elasticsearch'][0]['credentials']['secret_key']
es_host = cloudgov_services['aws-elasticsearch'][0]['credentials']['uri']

awsauth = AWS4Auth(
es_access_key,
es_secret_key,
'us-gov-west-1',
'es'
)

# Elastic
ELASTICSEARCH_DSL = {
'default': {
'hosts': os.getenv('ELASTIC_HOST', 'elastic:9200'),
'hosts': es_host,
'http_auth': awsauth,
'use_ssl': True,
'connection_class': RequestsHttpConnection,
},
}
ELASTIC_INDEX_PREFIX = f'{APP_NAME}_'
Expand Down

0 comments on commit 6e9369b

Please sign in to comment.