Skip to content

Commit 20a7b70

Browse files
authored
Update README.md
1 parent 9c7dbe8 commit 20a7b70

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

examples/SchedulerDemo/README.md

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,5 @@
11
# Using scheduler API in Hyperflow workflows
22

3-
A scheduler in general makes two decisions: (1) *when* (at which point in time) and (2) *where* (on which node) to run a *workflow task*. To this end, three API functions are provided:
3+
This project demonstrates how to use the HyperFlow scheduler API in workflows.
44

5-
```
6-
let node = await scheduler.getTaskExecutionPermission(context.appId, context.procId);
7-
```
8-
This function will wait until the scheduler permits to execute the task (*when*) and return the node name on which the task should be executed (*where*).
9-
10-
```
11-
scheduler.addTaskItem(taskItem, taskFunction2Cb)
12-
```
13-
This is an asynchronous alternative of `getTaskExecutionPermission`, also enabling the scheduler to [agglomerate tasks](https://github.com/hyperflow-wms/hyperflow/wiki/Task-agglomeration). See documentation in the code for details.
14-
15-
```
16-
scheduler.notifyTaskCompletion(context.appId, context.procId);
17-
```
18-
This function should be used to notify that a task has been completed. This allows the scheduler to trigger subsequent tasks, or even update the execution schedule.
19-
20-
## Running the example
21-
22-
See [Hyperflow simple scheduler](https://github.com/hyperflow-wms/hyperflow-simple-scheduler)
5+
See [Hyperflow simple scheduler](https://github.com/hyperflow-wms/hyperflow-simple-scheduler) project for information on API and running the workflow.

0 commit comments

Comments
 (0)