Skip to content

Commit 93720d8

Browse files
committed
1 parent a578c78 commit 93720d8

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

example/worker.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ const ZB = require('../dist')
66
const topology = await zbc.topology()
77
console.log(JSON.stringify(topology, null, 2))
88

9-
let workflows = await zbc.listWorkflows()
10-
console.log(workflows)
11-
129
await zbc.deployWorkflow('./test.bpmn')
1310
workflows = await zbc.listWorkflows()
1411
console.log(workflows)
@@ -20,7 +17,7 @@ const ZB = require('../dist')
2017
}, 1000000)
2118
})()
2219

23-
function handler(payload, complete) {
24-
console.log('ZB payload', payload)
25-
complete(payload.variables)
20+
function handler(job, complete) {
21+
console.log('Job payload', job)
22+
complete(job.variables)
2623
}

example/workflows.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ const ZB = require('../dist')
33

44
;(async () => {
55
const zbc = new ZB.ZBClient({
6-
onConnectionError: err => console.log('err', err),
7-
onReady: () => console.log('YOO'),
6+
onConnectionError: () => console.log('Connection Error'),
7+
onReady: () => console.log('Ready to work'),
88
})
99
const topology = await zbc.topology()
1010
console.log(JSON.stringify(topology, null, 2))

0 commit comments

Comments
 (0)