Commit 3039bed6 by Clinton Blackburn Committed by Clinton Blackburn

Logging stacktrace for all calls to EdxElasticsearchSearchBackend.setup()

LEARNER-2188
parent 6dac7a77
import logging
import traceback
from haystack.backends.elasticsearch_backend import ElasticsearchSearchBackend, ElasticsearchSearchEngine
from course_discovery.apps.edx_haystack_extensions.elasticsearch_boost_config import get_elasticsearch_boost_config
logger = logging.getLogger(__name__)
class SimpleQuerySearchBackendMixin(object):
"""
......@@ -128,6 +133,10 @@ class EdxElasticsearchSearchBackend(SimpleQuerySearchBackendMixin, NonClearingSe
return super().search(query_string, **kwargs)
def setup(self):
logger.info('DEBUG: EdxElasticsearchSearchBackend.setup() called: %s', '\n'.join(traceback.format_stack()))
return super().setup()
class EdxElasticsearchSearchEngine(ElasticsearchSearchEngine):
backend = EdxElasticsearchSearchBackend
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment