Mercurial > piecrust2
view foodtruck/main.py @ 711:ab5c6a8ae90a
bake: Replace hard-coded taxonomy support with "generator" system.
* Taxonomies are now implemented one or more `TaxonomyGenerator`s.
* A `BlogArchivesGenerator` stub is there but non-functional.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 26 May 2016 19:52:47 -0700 |
parents | 200c7063affa |
children | 3885421c29a3 |
line wrap: on
line source
import logging logger = logging.getLogger(__name__) def run_foodtruck(host=None, port=None, debug=False): if debug: import foodtruck.settings foodtruck.settings.DEBUG = debug from .web import app try: app.run(host=host, port=port, 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