MCPcopy
hub / github.com/redis/ioredis / sendCommand

Method sendCommand

lib/Pipeline.ts:210–229  ·  view source on GitHub ↗
(command: Command)

Source from the content-addressed store, hash-verified

208 }
209
210 sendCommand(command: Command): unknown {
211 if (this._transactions > 0) {
212 command.inTransaction = true;
213 }
214
215 const position = this._queue.length;
216 command.pipelineIndex = position;
217
218 command.promise
219 .then((result) => {
220 this.fillResult([null, result], position);
221 })
222 .catch((error) => {
223 this.fillResult([error], position);
224 });
225
226 this._queue.push(command);
227
228 return this;
229 }
230
231 addBatch(commands) {
232 let command, commandName, args;

Callers 2

fillResultMethod · 0.95
execPipelineFunction · 0.45

Calls 2

fillResultMethod · 0.95
pushMethod · 0.45

Tested by

no test coverage detected