annotate web/templog.uwsgi @ 606:3c1d37d78415 rust

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