Opened 2 years ago

Last modified 2 years ago

#33745 closed Bug

There is no easy way to turn off sync_to_async and async_to_sync adapters — at Initial Version

Reported by: abetkin Owned by: nobody
Component: Uncategorized Version: 4.0
Severity: Release blocker Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi! I have a setup that is deployed with nginx unit (https://unit.nginx.org)

I have 1 asgi and 1 wsgi application, namely for my sync and async endpoints. All my code runs natively, there is no need to adapt my code with sync_to_async-like stuff.

If an async endpoint is routed to the wsgi application, it is AN ERROR for me. However, django will silently adapt it and run in a separate thread.
The same happens if a sync endpoint is dispatched to the asgi application. Again, I want that to be an error!

I've found no easy way to turn this behavior off or even to check that this is happening, to log it somewhere. I think this is wrong.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top