Merge branch 'master' into asset-pipeline
This commit is contained in:
0
djangoapps/heartbeat/__init__.py
Normal file
0
djangoapps/heartbeat/__init__.py
Normal file
5
djangoapps/heartbeat/urls.py
Normal file
5
djangoapps/heartbeat/urls.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from django.conf.urls.defaults import *
|
||||||
|
|
||||||
|
urlpatterns = patterns('',
|
||||||
|
url(r'^$', 'heartbeat.views.heartbeat', name='heartbeat'),
|
||||||
|
)
|
||||||
12
djangoapps/heartbeat/views.py
Normal file
12
djangoapps/heartbeat/views.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import json
|
||||||
|
from datetime import datetime
|
||||||
|
from django.http import HttpResponse
|
||||||
|
|
||||||
|
def heartbeat(request):
|
||||||
|
"""
|
||||||
|
Simple view that a loadbalancer can check to verify that the app is up
|
||||||
|
"""
|
||||||
|
output = {
|
||||||
|
'date': datetime.now().isoformat()
|
||||||
|
}
|
||||||
|
return HttpResponse(json.dumps(output, indent=4))
|
||||||
1
urls.py
1
urls.py
@@ -67,6 +67,7 @@ if settings.COURSEWARE_ENABLED:
|
|||||||
url(r'^edit_circuit/(?P<circuit>[^/]*)$', 'circuit.views.edit_circuit'),
|
url(r'^edit_circuit/(?P<circuit>[^/]*)$', 'circuit.views.edit_circuit'),
|
||||||
url(r'^save_circuit/(?P<circuit>[^/]*)$', 'circuit.views.save_circuit'),
|
url(r'^save_circuit/(?P<circuit>[^/]*)$', 'circuit.views.save_circuit'),
|
||||||
url(r'^calculate$', 'util.views.calculate'),
|
url(r'^calculate$', 'util.views.calculate'),
|
||||||
|
url(r'^heartbeat$', include('heartbeat.urls')),
|
||||||
)
|
)
|
||||||
|
|
||||||
if settings.ENABLE_MULTICOURSE:
|
if settings.ENABLE_MULTICOURSE:
|
||||||
|
|||||||
Reference in New Issue
Block a user