Mercurial > piecrust2
view foodtruck/main.py @ 610:efc1dc916e7c
admin: Configuration changes.
* Move publish targets to site configuration.
* Add direct accessor for the current site.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 28 Jan 2016 22:17:58 -0800 |
parents | c6bc0ef03f82 |
children | 200c7063affa |
line wrap: on
line source
import logging logger = logging.getLogger(__name__) def run_foodtruck(debug=False): if debug: import foodtruck.settings foodtruck.settings.DEBUG = debug from .web import app try: app.run(debug=debug, threaded=True) except SystemExit: # This is needed for Werkzeug's code reloader to be able to correctly # shutdown the child process in order to restart it (otherwise, SSE # generators will keep it alive). from . import pubutil logger.debug("Shutting down SSE generators from main...") pubutil.server_shutdown = True raise