bravado icon indicating copy to clipboard operation
bravado copied to clipboard

Ensure that crochet/twisted is not initialized at import time

Open dnephin opened this issue 10 years ago • 0 comments

We're seeing an issue where daemonized processes that use swagger-py fail. I believe this is due to swagger-py importing from twisted.internet import reactor, which causes the twisted reactor to be initialzied. The twisted reactor uses file handles which are closed during daemonize, so the reactor needs to be initialized only when the first call is made (not at import time).

There may be other imports that trigger this behaviour as well.

dnephin avatar Jan 12 '15 16:01 dnephin