Replies: 1 comment
-
So, basically it's not possible, because tasks are not planned to be executed before the actual execution. The scheduler grabs all schedules from all sources and calculates which schedules to run now. But, you can easily get all planned tasks, by filtering out all tasks which has |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I'm implementing custom
ScheduleSource
which loads schedules from PostgreSQL. I would like to allow a user to set up schedules for tasks so that the scheduler loads them dynamically. It seems to be not difficult to implementget_schedules
method which is going to query the database.I also would like user to see the tasks which are going to be executed in the future (one upcoming task for each schedule). For such case, there is
runs
table in the database which stores records about past and upcoming runs. However, I couldn't find a solution to implement it using taskiq scheduler. It would be great ifScheduleSource
had a method which is called by the scheduler when the task is scheduled to be executed in the future (when the coroutine with delayed send is created).I would like to contribute to the library to extend the scheduler:
on_schedule
.on_schedule
.scheduler.on_schedule(source, task)
before going to sleepDoes it make sense?
Beta Was this translation helpful? Give feedback.
All reactions