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() return next()
}) })
} else { } else {
console.time('sequence time')
return sequence.start({ return sequence.start({
loop : [ (next) => { loop : [ (next) => {
intval.frame(dir, exposure, (len) => { intval.frame(dir, exposure, (len) => {
@ -304,9 +305,10 @@ function rSequence (req, res, next) {
}, delay) }, delay)
}] }]
}, (seq) => { }, (seq) => {
res.send(seq) console.timeEnd('sequence time')
return next()
}) })
res.send({})
return next()
} }
} }