Skip to content
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

Investigate using async view for message endpoint #19

Open
adamghill opened this issue Aug 4, 2020 · 4 comments
Open

Investigate using async view for message endpoint #19

adamghill opened this issue Aug 4, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@adamghill
Copy link
Owner

Once Django 3.1 and async views are available, see how hard it would be to use an async view if configured.

adamghill added a commit that referenced this issue Jan 23, 2021
@adamghill adamghill self-assigned this Jan 23, 2021
@adamghill adamghill added the enhancement New feature or request label Jan 29, 2021
@gschurck
Copy link

@adamghill Do you have any news about using async views with Unicorn ?

@hyusetiawan
Copy link

is there any update to using async? Especially using it in the actions. I tried it and it's throwing an error as you might already know. I am using 0.52.0

@adamghill
Copy link
Owner Author

I haven't looked into async other than the initial commit above to set up a way to prototype it. Can you create a PR with an initial use case? That would give me a good starting place.

@hyusetiawan
Copy link

it's pretty straight forward to set up actually. Just have an async action like so:

from asyncio import sleep
async def submit_form(self):
    sleep(3)
    self.text = 'done'

right now, we can actually make it work by decorating it using async_to_sync decorator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants