Created
December 11, 2009 17:47
-
-
Save voidlizard/254375 to your computer and use it in GitHub Desktop.
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
| #!/usr/bin/env python | |
| from flup.server.fcgi_fork import WSGIServer | |
| #import psyco | |
| #psyco.full() | |
| if __name__ == '__main__': | |
| import sys, os | |
| if not os.environ['TRACKER_HOME']: | |
| raise Exception('$TRACKER_HOME variable not set') | |
| sys.path.append(os.path.join(os.environ['TRACKER_HOME'],'lib')) | |
| sys.path.append(os.path.join(os.environ['TRACKER_HOME'],'code')) | |
| from project.application import create_application | |
| from colubrid.debug import DebuggedApplication | |
| from colubrid import execute | |
| from config import configuration | |
| import phenopy.memcached as memcached | |
| import phenopy.sql.postgres as postgres | |
| import psycopg2 | |
| app = create_application() | |
| if len(sys.argv)>1 and sys.argv[1] == 'debug': | |
| os.environ['TRACKER_PROFILE'] = 'dev' | |
| conf = configuration(os.environ['TRACKER_PROFILE']) | |
| memcached.settings.url = conf.memcached | |
| debug = DebuggedApplication(app, True) | |
| execute(debug, reload=True) | |
| else: | |
| WSGIServer(app).run() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment