redis-smq
Version:
A high-performance, reliable, and scalable message queue for Node.js.
11 lines • 715 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.withExclusivePoolConnection = withExclusivePoolConnection;
const redis_smq_common_1 = require("redis-smq-common");
const redis_connection_pool_js_1 = require("./redis-connection-pool.js");
const connection_pool_js_1 = require("./types/connection-pool.js");
function withExclusivePoolConnection(operation, callback) {
const connectionPool = redis_connection_pool_js_1.RedisConnectionPool.getInstance();
redis_smq_common_1.async.withCallback((cb) => connectionPool.acquire(connection_pool_js_1.ERedisConnectionAcquisitionMode.EXCLUSIVE, cb), operation, callback);
}
//# sourceMappingURL=with-exclusive-pool-connection.js.map