Last active
January 2, 2016 08:09
-
-
Save micahhausler/8274935 to your computer and use it in GitHub Desktop.
Django heartbeat configuration for ELB Health Check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.http import HttpResponse | |
def HeartBeat(request): | |
""" | |
This method is for the AWS load balancer health check. | |
""" | |
return HttpResponse('{\'data\': {\'status\': \'healthy\'}}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEBUG = False | |
ALLOWED_HOSTS = [ | |
'demo.ambition.io', | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf.urls import patterns, include, url | |
from views import HeartBeat | |
urlpatterns = patterns( | |
# ... | |
url(r'^heartbeat/$', HeartBeat, name='ambition.heartbeat') | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment