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
Copy file name to clipboardExpand all lines: docs/available-components/schedule-sources.md
+46-3Lines changed: 46 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,12 @@ order: 4
5
5
# Available schedule sources
6
6
7
7
These objects are used to fetch current schedule for tasks.
8
-
Currently we have only one schedule source.
9
8
10
-
## RedisScheduleSource
9
+
## Official schedule sources
10
+
11
+
These schedule sources are not part of the core Taskiq library. But they are maintained by Taskiq developers. You can install them as a separate package.
12
+
13
+
### RedisScheduleSource
11
14
12
15
This source is capable of adding new schedules in runtime. It uses Redis as a storage for schedules.
13
16
To use this source you need to install `taskiq-redis` package.
For more information on how to use dynamic schedule sources read [Dynamic scheduling section](../guide/scheduling-tasks.md#dynamic-scheduling).
25
28
26
29
27
-
## LabelScheduleSource
30
+
###LabelScheduleSource
28
31
29
32
This source parses labels of tasks, and if it finds a `schedule` label, it considers this task as scheduled.
30
33
@@ -76,3 +79,43 @@ In order to resolve all labels correctly, don't forget to import
76
79
all task modules using CLI interface.
77
80
78
81
:::
82
+
83
+
### NATS schedule source
84
+
85
+
This source is capable of adding new schedules in runtime. It uses NATS as a storage for schedules.
86
+
To use this source you need to install `taskiq-nats` package.
87
+
88
+
```python
89
+
from taskiq_nats import NATSKeyValueScheduleSource
90
+
from taskiq.scheduler import TaskiqScheduler
91
+
92
+
93
+
broker =...
94
+
95
+
scheduler = TaskiqScheduler(
96
+
broker=broker,
97
+
sources=[NATSKeyValueScheduleSource(broker)],
98
+
)
99
+
```
100
+
101
+
This schedule source doesn't use `schedule` label on tasks. To add new schedules, you need to call `add_schedule` method on the source.
102
+
103
+
## Third-party schedule sources
104
+
105
+
These schedule sources are not part of the core Taskiq library. They are maintained by other open‑source contributors. You can install them as a separate packages.
0 commit comments