comparison piecrust/serving/server.py @ 418:d5724c0c8f1a

serve: Fix crash on start.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 20 Jun 2015 23:24:17 -0700
parents e7b865f8f335
children 30f2c2a595f5
comparison
equal deleted inserted replaced
417:eef887cec776 418:d5724c0c8f1a
79 if not self.run_sse_check or self.run_sse_check(): 79 if not self.run_sse_check or self.run_sse_check():
80 # When using a server with code reloading, some implementations 80 # When using a server with code reloading, some implementations
81 # use process forking and we end up going here twice. We only want 81 # use process forking and we end up going here twice. We only want
82 # to start the pipeline loop in the inner process most of the 82 # to start the pipeline loop in the inner process most of the
83 # time so we let the implementation tell us if this is OK. 83 # time so we let the implementation tell us if this is OK.
84 from piecrust.processing.base import ProcessorPipeline 84 from piecrust.processing.pipeline import ProcessorPipeline
85 from piecrust.serving.procloop import ProcessingLoop 85 from piecrust.serving.procloop import ProcessingLoop
86 pipeline = ProcessorPipeline(app, self._out_dir) 86 pipeline = ProcessorPipeline(app, self._out_dir)
87 self._proc_loop = ProcessingLoop(pipeline) 87 self._proc_loop = ProcessingLoop(pipeline)
88 self._proc_loop.start() 88 self._proc_loop.start()
89 89