UNPKG

redis-smq

Version:

A high-performance, reliable, and scalable message queue for Node.js.

24 lines 900 B
import { async } from 'redis-smq-common'; import { redisKeys } from '../../common/redis/redis-keys/redis-keys.js'; import { _queueExists } from './_queue-exists.js'; import { QueueNotFoundError } from '../../errors/index.js'; export function _getQueueConsumerIds(client, queue, cb) { async.series([ (cb) => _queueExists(client, queue, (err, reply) => { if (err) return cb(err); if (!reply) return cb(new QueueNotFoundError({ metadata: { queue, }, })); cb(); }), (cb) => { const { keyQueueConsumers } = redisKeys.getQueueKeys(queue.ns, queue.name, null); client.hkeys(keyQueueConsumers, cb); }, ], (err, reply) => cb(err, reply?.[1])); } //# sourceMappingURL=_get-queue-consumer-ids.js.map