Skip to content
Snippets Groups Projects
Commit 57444bdd authored by Calen Pennington's avatar Calen Pennington
Browse files

Make heartbeat url wait for courses to be loaded

parent 410335ed
No related branches found
No related tags found
No related merge requests found
import json
from datetime import datetime
from django.http import HttpResponse
from xmodule.modulestore.django import modulestore
def heartbeat(request):
......@@ -8,6 +9,7 @@ def heartbeat(request):
Simple view that a loadbalancer can check to verify that the app is up
"""
output = {
'date': datetime.now().isoformat()
'date': datetime.now().isoformat(),
'courses': [course.location for course in modulestore().get_courses()],
}
return HttpResponse(json.dumps(output, indent=4))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment