Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
course-discovery
Commits
e42374d0
Commit
e42374d0
authored
May 16, 2018
by
Cory Lee
Committed by
Cory Lee
May 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dont
parent
41b51d08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
course_discovery/apps/core/views.py
+6
-2
No files found.
course_discovery/apps/core/views.py
View file @
e42374d0
...
...
@@ -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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment