Do not wait for sequence to finish to respond to /sequence request
This commit is contained in:
parent
0a3add86cb
commit
fc99b9ff06
6
index.js
6
index.js
|
@ -293,6 +293,7 @@ function rSequence (req, res, next) {
|
|||
return next()
|
||||
})
|
||||
} else {
|
||||
console.time('sequence time')
|
||||
return sequence.start({
|
||||
loop : [ (next) => {
|
||||
intval.frame(dir, exposure, (len) => {
|
||||
|
@ -304,9 +305,10 @@ function rSequence (req, res, next) {
|
|||
}, delay)
|
||||
}]
|
||||
}, (seq) => {
|
||||
res.send(seq)
|
||||
return next()
|
||||
console.timeEnd('sequence time')
|
||||
})
|
||||
res.send({})
|
||||
return next()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue