-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
add a way to run an app asynchron #2375
Comments
I didn't get the use case. Can you elaborate? |
Actually I think we do it the other way around. Put your tasks in jobs with https://github.com/aio-libs/aiojobs then run your app with |
I have a long running application/job/process running and want to add a REST interface to expose some internals during the runtime |
Then why not using the startup hooks to add those long running applications/jobs/processes? Here is my use case where I have a microservice with an API running, but there is a background tasks that monitors events from the Docker API: https://github.com/big-data-europe/mu-swarm-admin-service/blob/master/muswarmadmin/main.py#L659 |
@cecton thanks for your link. In fact I could with a very small change use aiohttp to spawn my "main" task and since both should all the time it is fine for me. |
@hwmrocker I'm glad it helped. We're still discussing about it on #2121 I will propose some changes that will become handy (when I have time and motivation 😣 ) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Long story short
It would be nice to have an async / coroutine that will take an app and run it. This is very usefull if you have an long running that wants to expose a rest interface.
Steps to reproduce
go to the web.py file and look for run function that runs an app asynchron
The text was updated successfully, but these errors were encountered: