Do not wait for sequence to finish to respond to /sequence request

This commit is contained in:
mmcw-dev 2017-12-20 20:51:14 -05:00
parent 0a3add86cb
commit fc99b9ff06
1 changed files with 4 additions and 2 deletions

View File

@ -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()
}
}