UNPKG

redis-smq

Version:

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

27 lines 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports._getQueueConsumerIds = _getQueueConsumerIds; const redis_smq_common_1 = require("redis-smq-common"); const redis_keys_js_1 = require("../../common/redis/redis-keys/redis-keys.js"); const _queue_exists_js_1 = require("./_queue-exists.js"); const index_js_1 = require("../../errors/index.js"); function _getQueueConsumerIds(client, queue, cb) { redis_smq_common_1.async.series([ (cb) => (0, _queue_exists_js_1._queueExists)(client, queue, (err, reply) => { if (err) return cb(err); if (!reply) return cb(new index_js_1.QueueNotFoundError({ metadata: { queue, }, })); cb(); }), (cb) => { const { keyQueueConsumers } = redis_keys_js_1.redisKeys.getQueueKeys(queue.ns, queue.name, null); client.hkeys(keyQueueConsumers, cb); }, ], (err, reply) => cb(err, reply === null || reply === void 0 ? void 0 : reply[1])); } //# sourceMappingURL=_get-queue-consumer-ids.js.map