move application export to isso.run

When using Gunicorn or uWSGI to run `isso.dispatch` it would
automatically initialize and a default Isso instance (and cause
several logging messages), although never used.

If you use uWSGI or Gunicorn, you have to change the module from
`isso` to `isso.run`.
legacy/0.6
Martin Zimmermann 11 years ago
parent ebad039d0e
commit adc722359d

@ -36,7 +36,7 @@ supply everything as command-line arguments):
processes = 4
cache2 = name=hash,items=1024,blocksize=32
spooler = %d/mail
module = isso
module = isso.run
virtualenv = %d
env = ISSO_SETTINGS=%d/sample.cfg

@ -184,4 +184,4 @@ To execute Isso, use a command similar to:
.. code-block:: sh
$ export ISSO_SETTINGS="/path/to/isso.cfg"
$ gunicorn -b localhost:8080 -w 4 --preload isso
$ gunicorn -b localhost:8080 -w 4 --preload isso.run

@ -223,7 +223,3 @@ def main():
if ex.errno != errno.ENOENT:
raise
wsgi.SocketHTTPServer(sock, make_app(conf)).serve_forever()
if sys.argv[0].endswith(("uwsgi", "gunicorn")):
application = make_app(Config.load(os.environ.get('ISSO_SETTINGS')))

@ -0,0 +1,8 @@
# -*- encoding: utf-8 -*-
import os
from isso import make_app
from isso.core import Config
application = make_app(Config.load(os.environ.get('ISSO_SETTINGS')))
Loading…
Cancel
Save