3 ms·
It will trigger an error to review the code. It still is bit of a trouble to debug async code with sync code. "Note that as a side-effect of this change, Djang
by dragonsh 7y ago
It will trigger an error to review the code. It still is bit of a trouble to debug async code with sync code.
"Note that as a side-effect of this change, Django is now aware of asynchronous event loops and will block you calling code marked as “async unsafe” - such as ORM operations - from an asynchronous context. If you were using Django from async code before, this may trigger if you were doing it incorrectly. If you see a SynchronousOnlyOperation error, then closely examine your code and move any database operations to be in a synchronous child thread."