Delete completely pointless block of code
@@ -264,21 +264,7 @@ def _elasticsearch_connect(timeout=300):
recommended.
:return: An Elasticsearch connection object.
"""
- try:
- log.info('Trying to connect to Elasticsearch without authentication...')
- # Try to connect to Elasticsearch without credentials.
- es = Elasticsearch(
- host=ELASTICSEARCH_URL,
- port=ELASTICSEARCH_PORT,
- connection_class=RequestsHttpConnection,
- timeout=timeout,
- max_retries=10,
- wait_for_status='yellow'
- )
- log.info(str(es.info()))
- log.info('Connected to Elasticsearch without authentication.')
- except (AuthenticationException, AuthorizationException):
- # If that fails, supply AWS authentication object and try again.
+
log.info(
'Connecting to %s %s with AWS auth', ELASTICSEARCH_URL,
ELASTICSEARCH_PORT)
