Created
July 15, 2014 11:35
-
-
Save inactivist/b59a26ae52e89f46eca9 to your computer and use it in GitHub Desktop.
is_heroku: Q&D method to detect running on Heroku container.
This file contains hidden or 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
import os | |
def is_heroku(): | |
"""Hack to return true if we're running inside a Heroku container. | |
Tested on Cedar stack. | |
""" | |
return os.environ.get('PYTHONHOME', '').find('.heroku') != -1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment