Replies: 3 comments 3 replies
-
This would be great, but I don't think it's especially simple. For now, keeping sync and async function execution the same makes things more dependable. Similarly, it potentially changes the resource requirements for a worker, as it may now be running multiple tasks concurrently. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the comment, very helpful. My issue right now is each task is just an I/O operation (API call to my GCP cloud function) that takes 15m to run so in your opinion, the only way to get around the massive cue that forms is to spin up more worker processes? |
Beta Was this translation helpful? Give feedback.
-
Yeah that's what I did actually. I created a separate queue and added
several tasks then another endpoint cron job to run every 30secs that
batches em up. Thanks for your help!
…On Sat, Jan 18, 2025 at 1:13 AM Christoph Hille ***@***.***> wrote:
@emuwakwe <https://github.com/emuwakwe> you could also put it together in
one task, as inside the task you can perform async operations
—
Reply to this email directly, view it on GitHub
<#117 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK7R44OFCHST46L5HWOLKKD2LILMRAVCNFSM6AAAAABRGF6GMOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBXGQYTEMA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
I have a tasks where I need to do a sleep. As I saw that async tasks are supported I created one and using
asyncio.sleep
. With that I thought this will then not block the queue.But in fact when I just tested, it turns out it will. If one task is running, no other tasks will be started. I checked now that the worker itself (the db_worker) is sync and calling the tasks with
call
.Wouldn't it be possible to have an async worker which is then calling the tasks with
acall
?Beta Was this translation helpful? Give feedback.
All reactions