annotate web/templog.uwsgi @ 560:18e6e830ca26

merge long polling
author Matt Johnston <matt@ucc.asn.au>
date Tue, 09 Jun 2015 23:39:22 +0800
parents a335760ad447
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
552
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
1 # see templog-uwsgi.ini for arguments
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
2
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
3 from gevent import monkey; monkey.patch_all()
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
4
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
5 import os
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
6 import sys
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
7 import trace
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
8 # Change working directory so relative paths (and template lookup) work again
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
9 thisdir = os.path.dirname(__file__)
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
10 if not thisdir:
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
11 thisdir="."
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
12 os.chdir(thisdir)
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
13 os.environ['LD_LIBRARY_PATH'] = '/home/matt/templog/web'
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
14
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
15 # for some reason local imports don't work...
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
16 sys.path.append(thisdir)
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
17
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
18 import bottle
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
19 import templog
a335760ad447 uwsgi bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
20 application = bottle.default_app()