Re: Refactor Scheduler Timed Events to be Async?

2024-05-03 Thread Ash Berlin-Taylor
One thing to bear in mind here is the number of db connections - each connection can only be used by one thread or coroutine at a time, so even when the scheduler is changed to use async db calls, we might not be able to do a lot of the scheduled tasks concurrently. At least not without thinkin

Re: Refactor Scheduler Timed Events to be Async?

2024-05-03 Thread Daniel Standish
But you could run them in a thread or subprocess. Another option would be to just take all of the timed events and make them all asyncio and then run them all via asyncio in one continually running thread. That would be a bite size step towards AIP-70. Though, it might be a large bite :) On Fri

Re: Refactor Scheduler Timed Events to be Async?

2024-05-03 Thread Hussein Awala
If we don't have many Asyncio tasks running in the event loop, there will not be any benefit from migrating to asynchronous, IMHO it will be anyway rewritten to be asynchronous as a part of AIP-70

Refactor Scheduler Timed Events to be Async?

2024-05-03 Thread Ryan Hatter
This might be a dumb question as I don't have experience with asyncio, but should the EventScheduler in the Airflow scheduler be rewritten to be asynchronous? The so called "timed events" (e.g. zombie reaping,