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
Example code in the scheduling-tasks section uses RedisScheduleSource class which is deprecated. I propose to rewrite the documentation using new classes.
Scheduling tasks
Code
fromtaskiq_redisimportListQueueBroker, RedisScheduleSourcefromtaskiqimportTaskiqScheduler# Here's the broker that is going to execute tasksbroker=ListQueueBroker("redis://localhost:6379/0")
# Here's the source that is used to store scheduled tasksredis_source=RedisScheduleSource("redis://localhost:6379/0")
# And here's the scheduler that is used to query scheduled sourcesscheduler=TaskiqScheduler(broker, sources=[redis_source])
@broker.taskasyncdefmy_task(arg1: int, arg2: str) ->None:
"""Example task."""print("Hello from my_task!", arg1, arg2) # noqa: T201
Result
/home/ltu/PycharmProjects/tazikq/main.py:9: DeprecationWarning: RedisScheduleSource is deprecated. Please switch to ListRedisScheduleSource
redis_source = RedisScheduleSource("redis://localhost:6379/0")
I think I can drop my PR here.
Activity
s3rius commentedon Nov 23, 2025
Was fixed in taskiq-python/taskiq#547