You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
feat: add auto pipeline
This commit is contained in:
@@ -88,7 +88,6 @@ function execTransaction (multi) {
|
||||
}
|
||||
const len = queue.length
|
||||
multi.errors = []
|
||||
client.cork()
|
||||
client._multi = true
|
||||
multi.wantsBuffers = new Array(len)
|
||||
// Silently ignore this error. We'll receive the error for the exec as well
|
||||
@@ -100,7 +99,6 @@ function execTransaction (multi) {
|
||||
}
|
||||
|
||||
const main = client.internalSendCommand(new Command('exec', []))
|
||||
client.uncork()
|
||||
return Promise.all(promises).then(() => main.then((replies) => multiCallback(multi, replies)).catch((err) => {
|
||||
err.errors = multi.errors
|
||||
return Promise.reject(err)
|
||||
@@ -125,7 +123,6 @@ function execBatch (multi) {
|
||||
})
|
||||
}
|
||||
var error = false
|
||||
client.cork()
|
||||
const promises = []
|
||||
while (queue.length) {
|
||||
const command = queue.shift()
|
||||
@@ -134,7 +131,6 @@ function execBatch (multi) {
|
||||
return e
|
||||
}))
|
||||
}
|
||||
client.uncork()
|
||||
return Promise.all(promises).then((res) => {
|
||||
if (error) {
|
||||
const err = new Errors.RedisError('bla failed')
|
||||
|
Reference in New Issue
Block a user