You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
chain pipeline commands
This commit is contained in:
@@ -749,11 +749,13 @@ export default class RedisClient<
|
||||
return Promise.reject(new ClientClosedError());
|
||||
}
|
||||
|
||||
const promise = Promise.all(
|
||||
commands.map(({ args }) => this._self.#queue.addCommand(args, {
|
||||
typeMapping: this._commandOptions?.typeMapping
|
||||
}))
|
||||
);
|
||||
const chainId = Symbol('Pipeline Chain'),
|
||||
promise = Promise.all(
|
||||
commands.map(({ args }) => this._self.#queue.addCommand(args, {
|
||||
chainId,
|
||||
typeMapping: this._commandOptions?.typeMapping
|
||||
}))
|
||||
);
|
||||
this._self.#scheduleWrite();
|
||||
const result = await promise;
|
||||
|
||||
|
Reference in New Issue
Block a user