Hi,
I’d like to use Twisted as a WSGI container for a Pyramid app and use hupper in dev.
Sadly there seems to be something broken about that setup when cleaning that I suspect is related to threads:
$ hupper -m twisted web --path=.
Starting monitor for PID 78003.
2017-01-11T17:46:46+0100 [-] Site starting on 8080
2017-01-11T17:46:46+0100 [twisted.web.server.Site#info] Starting factory <twisted.web.server.Site instance at 0x1021e5a28>
2017-01-11T17:46:46+0100 [twisted.application.runner._runner.Runner#info] Starting reactor...
^CKilling server with PID 78003.
2017-01-11T17:46:49+0100 [-] Received SIGTERM, shutting down.
2017-01-11T17:46:49+0100 [-] Received SIGINT, shutting down.
2017-01-11T17:46:49+0100 [-] Unhandled Error
Traceback (most recent call last):
File "/Users/hynek/.virtualenvs/tempenv-1c44245683697/lib/python2.7/site-packages/twisted/application/runner/_runner.py", line 63, in run
self.startReactor()
File "/Users/hynek/.virtualenvs/tempenv-1c44245683697/lib/python2.7/site-packages/twisted/application/runner/_runner.py", line 166, in startReactor
reactor.run()
File "/Users/hynek/.virtualenvs/tempenv-1c44245683697/lib/python2.7/site-packages/twisted/internet/base.py", line 1199, in run
self.mainLoop()
File "/Users/hynek/.virtualenvs/tempenv-1c44245683697/lib/python2.7/site-packages/twisted/internet/base.py", line 1208, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/Users/hynek/.virtualenvs/tempenv-1c44245683697/lib/python2.7/site-packages/twisted/internet/base.py", line 801, in runUntilCurrent
f(*a, **kw)
File "/Users/hynek/.virtualenvs/tempenv-1c44245683697/lib/python2.7/site-packages/twisted/internet/base.py", line 584, in stop
"Can't stop reactor that isn't running.")
twisted.internet.error.ReactorNotRunning: Can't stop reactor that isn't running.
2017-01-11T17:46:49+0100 [-] (TCP Port 8080 Closed)
2017-01-11T17:46:49+0100 [twisted.web.server.Site#info] Stopping factory <twisted.web.server.Site instance at 0x1021e5a28>
2017-01-11T17:46:49+0100 [-] Main loop terminated.
Please note I’m pressing Ctrl-C there, it’s not exploding or something.
To reproduce simply install twisted and hupper and run the command line from my example.
Any ideas how to fix that? Since Twisted doesn’t have own means for reloading, it would be great if hupper had first class support.
P.S. Tested on macOS Sierra with both Python 3.5.2 & 2.7.13.
Hi,
I’d like to use Twisted as a WSGI container for a Pyramid app and use hupper in dev.
Sadly there seems to be something broken about that setup when cleaning that I suspect is related to threads:
Please note I’m pressing Ctrl-C there, it’s not exploding or something.
To reproduce simply install twisted and hupper and run the command line from my example.
Any ideas how to fix that? Since Twisted doesn’t have own means for reloading, it would be great if hupper had first class support.
P.S. Tested on macOS Sierra with both Python 3.5.2 & 2.7.13.