-
Notifications
You must be signed in to change notification settings - Fork 1
/
worker.js
47 lines (34 loc) · 1.54 KB
/
worker.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//https://zeebe.joshwulf.com/quickstart/quickstart/
const { ZBClient } = require('zeebe-node')
function main() {
const zbc = new ZBClient({
onReady: () => console.log(`Connected!`),
onConnectionError: () => console.log(`Disconnected!`)
})
zbc.createWorker("ImageInspectionWorker", "ImageInspection", (job, complete) => {
console.log(job.variables);
CompleteImageInspectionWorker(complete);
console.log('Image Inspection Worker Completed');
})
zbc.createWorker("VideoInspectionWorker", "VideoInspection", (job, complete) => {
console.log(job.variables);
CompleteVideoInspectionWorker(complete);
console.log('Video Inspection Worker Completed');
})
zbc.createWorker("HistogramMatchWorker", "HistogramMatch", (job, complete) => {
console.log(job.variables);
console.log('Histogram Match Worker Completed');
CompleteHistogramMatchWorker(complete);
})
/////////////////////////////////////////////////////////////////////////////////////
function CompleteImageInspectionWorker(complete) {
complete.success({ baseImageLocationSrc: 'C:/imagedir'});
}
function CompleteVideoInspectionWorker(complete) {
complete.success({outputFramesSrc: ['outputFrames: C:/bob, outputFrames: c:/frame1, outputFrames : c:/frame2' ], baseImageLocationSrc : 'stuff'})
}
function CompleteHistogramMatchWorker(complete) {
complete.success(console.log('Histo Completed'))
}
};
main();