-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@sync_to_async(thread_sensitive=True) #155
Comments
Hi @kbhalerao I think you've found the problem. It's documented as supporting that, but the code doesn't. It needs a test, then refactoring to match that. |
Yeah, I'm going to remove that from the documentation for now as it doesn't work yet. We should, however, add support for it in. |
I opened a PR to remove the doc example here: django/django#12706 |
Happy to include support for doing this, as a part of #159, or once its merged in. |
It wouldn't be good form to mix it up with a pull request for a different thing - happy to accept a separate PR for that, though. |
Still having the issues as of now |
Hi - thank you for this wonderful project and its integration in Django 3.
I think I have noticed a bug - although it could be in my head. I believe the decorator
@sync_to_async(thread_sensitive=True)
as shown here is causing an error as follows:@sync_to_async(thread_sensitive=True) TypeError: __init__() missing 1 required positional argument: 'func'
Using it as a function call
await sync_to_async(my_sync_function, thread_sensitive=True)()
works fine. I will look through the code and see if I can figure out how to fix this. I noticed there were no tests specifically testing the decorator with this option set.Cheers
KB
The text was updated successfully, but these errors were encountered: