You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After scheduler restart all cron scheduled tasks are getting duplicated...
Should we remove all scheduled tasks on scheduler startup like in code bellow? Right now only time (not cron) scheduled tasks are removed on "post_send", but if scheduler was killed or stopped before task was delivered to the worker it wouldn't be deleted too
Right now I cleanup scheduled tasks at TaskiqScheduler method
async def startup(self) -> None:
for source in self.sources:
tasks = await source.get_schedules()
for task in tasks:
await source.delete_schedule(task.schedule_id)
The text was updated successfully, but these errors were encountered:
So, you can use labeleschedulesource for static crons. It doesn't store anything anywhere. It reads all available tasks and creates schedules based on tasks labels. You can add it along redis-schedule-source to enable this functionality.
But if you want to add them dynamically and use other schedule_sources, then that's the only way.
Hello,
After scheduler restart all cron scheduled tasks are getting duplicated...
Should we remove all scheduled tasks on scheduler startup like in code bellow? Right now only time (not cron) scheduled tasks are removed on "post_send", but if scheduler was killed or stopped before task was delivered to the worker it wouldn't be deleted too
Right now I cleanup scheduled tasks at TaskiqScheduler method
async def startup(self) -> None:
for source in self.sources:
tasks = await source.get_schedules()
The text was updated successfully, but these errors were encountered: