Skip to content

Commit d0d256c

Browse files
authored
Update README.md
1 parent 8fc334c commit d0d256c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/RemoteJobs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Communication with remote Jobs using Redis
22
This example demonstrates how HyperFlow can communicate with remote job executors using Redis.
33

4-
- The workflow invokes function `submitRemoteJob` from `functions.js` 100 times. This function simulates submission of jobs by starting 100 parallel processes of `handler.js`.
4+
- The workflow invokes function `submitRemoteJob` from `functions.js` 100 times. This function simulates submission of jobs by starting 100 parallel processes of `node handler.js <taskId> <redis_url>`.
55
- `handler.js` represents a remote job executor which is passed two parameters: `taskId` and `redis_url`.
66
- `handler.js` gets a `jobMessage` from HyperFlow, and then sends back a notification that the job has completed; `taskId` is used to construct appropriate Redis keys for this communication.
77
- On the HyperFlow engine side, the Process Function can use two functions: `context.sendMsgToJob` to send a message to the job, and `context.jobResult` to wait for the notification. These functions return a [`Promise`](https://javascript.info/promise-basics), so the async/await syntax can be used as shown in the example.

0 commit comments

Comments
 (0)