annotate web/templog.wsgi @ 284:8ea6c90774e3

add dependencies
author Matt Johnston <matt@ucc.asn.au>
date Wed, 23 Mar 2016 21:34:44 +0800
parents 141948a400a6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
238
509a1be16456 gevent doesn't work well with subprocess
Matt Johnston <matt@ucc.asn.au>
parents: 237
diff changeset
1 #from gevent import monkey; monkey.patch_all()
237
abc837a7e60f gevent seems to work
Matt Johnston <matt@ucc.asn.au>
parents: 104
diff changeset
2
85
3cd1ca6d0489 - Fix HTTPError
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
3 import os
3cd1ca6d0489 - Fix HTTPError
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
4 import sys
3cd1ca6d0489 - Fix HTTPError
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
5 # Change working directory so relative paths (and template lookup) work again
3cd1ca6d0489 - Fix HTTPError
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
6 thisdir = os.path.dirname(__file__)
3cd1ca6d0489 - Fix HTTPError
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
7 os.chdir(thisdir)
104
7f3fc0980df1 - few more web tweaks. don't fsync, it's slow.
Matt Johnston <matt@ucc.asn.au>
parents: 85
diff changeset
8 os.environ['LD_LIBRARY_PATH'] = '/home/matt/templog/web'
85
3cd1ca6d0489 - Fix HTTPError
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
9
3cd1ca6d0489 - Fix HTTPError
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
10 # for some reason local imports don't work...
3cd1ca6d0489 - Fix HTTPError
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
11 sys.path.append(thisdir)
3cd1ca6d0489 - Fix HTTPError
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
12
3cd1ca6d0489 - Fix HTTPError
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
13 import bottle
3cd1ca6d0489 - Fix HTTPError
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
14 import templog
3cd1ca6d0489 - Fix HTTPError
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
15 application = bottle.default_app()