MCPcopy
hub / github.com/redis/node-redis / #normalResubscribe

Method #normalResubscribe

packages/client/lib/client/pub-sub.ts:352–364  ·  view source on GitHub ↗
(commands: PubSubCommand[], type: string, listeners: PubSubTypeListeners)

Source from the content-addressed store, hash-verified

350 }
351
352 #normalResubscribe(commands: PubSubCommand[], type: string, listeners: PubSubTypeListeners) {
353 this.#subscribing++;
354 const callback = () => this.#subscribing--;
355 commands.push({
356 args: [
357 COMMANDS[type as PubSubType].subscribe,
358 ...listeners.keys()
359 ],
360 channelsCounter: listeners.size,
361 resolve: callback,
362 reject: callback
363 });
364 }
365
366 #shardedResubscribe(commands: PubSubCommand[], listeners: PubSubTypeListeners) {
367 const callback = () => this.#subscribing--;

Callers 1

resubscribeMethod · 0.95

Calls 2

keysMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected