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: README.md
+52-29Lines changed: 52 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -7,38 +7,61 @@
7
7
## Introduction
8
8
9
9
A highlevel interface for the dispatch API.
10
-
The interface is made of the dispatch actor which should run once per microgrid.
11
-
It provides two channels for clients:
12
-
- "new_dispatches" for newly created dispatches
13
-
- "ready_dispatches" for dispatches that are ready to be executed
14
10
15
-
## Example Usage
11
+
See [the documentation](https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch) for more information.
12
+
13
+
## Usage
14
+
15
+
The [`Dispatcher` class](https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch/#frequenz.dispatch.Dispatcher), the main entry point for the API, provides two channels:
16
+
17
+
*[Lifecycle events](https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch/#frequenz.dispatch.Dispatcher.lifecycle_events): A channel that sends a message whenever a [Dispatch][frequenz.dispatch.Dispatch] is created, updated or deleted.
18
+
*[Running status change](https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch/#frequenz.dispatch.Dispatcher.running_status_change): Sends a dispatch message whenever a dispatch is ready to be executed according to the schedule or the running status of the dispatch changed in a way that could potentially require the actor to start, stop or reconfigure itself.
19
+
20
+
### Example using the running status change channel
16
21
17
22
```python
18
-
asyncdefrun():
19
-
# dispatch helper sends out dispatches when they are due
0 commit comments