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()
|
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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue