Commit 0af8502c by Calen Pennington

Dirt-simple heartbeat page for use by AWS load balancers

parent 431704ac
from django.conf.urls.defaults import *
urlpatterns = patterns('',
url(r'^$', 'heartbeat.views.heartbeat', name='heartbeat'),
)
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))
...@@ -67,6 +67,7 @@ if settings.COURSEWARE_ENABLED: ...@@ -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:
......
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