Skip to content

Commit 35cb8de

Browse files
committed
Explain functionality more in the documentation
Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent d806154 commit 35cb8de

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/frequenz/dispatch/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@
1515
class Dispatcher:
1616
"""A highlevel interface for the dispatch API.
1717
18-
This class provides a highlevel interface to the dispatch API. It
18+
This class provides a highlevel interface to the dispatch API.
19+
It provides two channels:
20+
21+
One that sends a dispatch event message whenever a dispatch is created, updated or deleted.
22+
23+
The other sends a dispatch message whenever a dispatch is ready to be
24+
executed according to the schedule.
25+
1926
allows to receive new dispatches and ready dispatches.
2027
2128
Example:

src/frequenz/dispatch/actor.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ def _update_dispatch_schedule(
174174
Schedules, reschedules or cancels the dispatch based on the start_time
175175
and active status.
176176
177+
For example:
178+
* when the start_time changes, the dispatch is rescheduled
179+
* when the dispatch is deactivated, the dispatch is cancelled
180+
177181
Args:
178182
dispatch: The dispatch to update the schedule for.
179183
old_dispatch: The old dispatch, if available.

0 commit comments

Comments
 (0)