I have a simple API exposed via tornado. Previously, one of the queries caused an rsync
to run. Through trial, error, exploration, I found that I could fork that off so that it didn't block a timely response:
tornado.process.Subprocess(['rsync', '-vazh', ... ])
I'm evolving this code now so that it no longer runs an external rsync
, but instead pokes another service. I'm using Requests to do so:
requests.post('http://other.service/foo/bar)
The network behind this service has really high latencies (same for the rysnc process), so I'd still like that to be forked off so that I don't put off a timely response. The tornado.process.Subprocess
seems well suited for calling non python shell programs to get work done. Is there an equivalent for doing so for python code like above?