Commit e42374d0 by Cory Lee Committed by Cory Lee

Dont

parent 41b51d08
......@@ -8,8 +8,11 @@ from django.db import DatabaseError, connection, transaction
from django.http import Http404, JsonResponse
from django.shortcuts import redirect
from django.views.generic import View
from course_discovery.apps.core.constants import Status
try:
import newrelic.agent
except ImportError: # pragma: no cover
newrelic = None # pylint: disable=invalid-name
logger = logging.getLogger(__name__)
User = get_user_model()
......@@ -32,7 +35,8 @@ def health(_):
>>> response.content
'{"overall_status": "OK", "detailed_status": {"database_status": "OK"}}'
"""
if newrelic: # pragma: no cover
newrelic.agent.ignore_transaction()
try:
cursor = connection.cursor()
cursor.execute("SELECT 1")
......
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