Commit 48343ad9 by David Ormsbee

Merge pull request #63 from MITx/heartbeat

Quick heartbeat page that ELB can monitor to detect if gunicorn is up and running or not
parents 47d81c31 d620e4b1
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))
......@@ -66,6 +66,7 @@ if settings.COURSEWARE_ENABLED:
url(r'^edit_circuit/(?P<circuit>[^/]*)$', 'circuit.views.edit_circuit'),
url(r'^save_circuit/(?P<circuit>[^/]*)$', 'circuit.views.save_circuit'),
url(r'^calculate$', 'util.views.calculate'),
url(r'^heartbeat$', include('heartbeat.urls')),
)
if settings.ASKBOT_ENABLED:
......
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