Commit 34b2ca49 by Cory Lee

Dont

parent 44a339f2
......@@ -11,7 +11,10 @@ from rest_framework.response import Response
from rest_framework.decorators import api_view, permission_classes
from elasticsearch.exceptions import TransportError
try:
import newrelic.agent
except ImportError: # pragma: no cover
newrelic = None # pylint: disable=invalid-name
if not settings.ES_DISABLED:
from haystack import connections
......@@ -37,6 +40,8 @@ def heartbeat(request): # pylint: disable=unused-argument
"""
ElasticSearch and database are reachable and ready to handle requests.
"""
if newrelic: # pragma: no cover
newrelic.agent.ignore_transaction()
try:
db_status()
except Exception:
......
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