4 ms·
In my opinion there is nothing wrong with doing simple Django ORM calls even with a tornado/gevent websocket. Async purists will cry foul, but if all you want i
by bayesianhorse 14y ago
In my opinion there is nothing wrong with doing simple Django ORM calls even with a tornado/gevent websocket. Async purists will cry foul, but if all you want is a realtime feature, you can block for a few milliseconds without getting into trouble.
In the long run they might build tulip-awareness into the ORM.
For that matter I start Tornado servers with management commands just for convenience...
- twism 14y agoOr you could do this ... https://gist.github.com/anonymous/5190528 https://gist.github.com/anonymous/5190528 This blocks in a separate thread leaving the event loop to handle other tasks.