bravado
bravado copied to clipboard
Ensure that crochet/twisted is not initialized at import time
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.