From 000956a93ac13fc9c05e02d83f05d617a6b0a0cc Mon Sep 17 00:00:00 2001 From: Aleksey Kuznetsov Date: Tue, 11 Jun 2024 13:40:21 +0300 Subject: [PATCH 1/2] chore: remove promise set for redis transporter ioredis v5 does not support plugging third-party Promise library anymore. --- src/transporters/redis.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/transporters/redis.js b/src/transporters/redis.js index 87c9071db..582937240 100644 --- a/src/transporters/redis.js +++ b/src/transporters/redis.js @@ -164,7 +164,6 @@ class RedisTransporter extends Transporter { let Redis; try { Redis = require("ioredis"); - Redis.Promise = this.broker.Promise; } catch (err) { /* istanbul ignore next */ this.broker.fatal( From 3a65b650187f6b3d7adec987966dd1d0d773e7c7 Mon Sep 17 00:00:00 2001 From: Icebob Date: Sun, 28 Jul 2024 11:22:28 +0200 Subject: [PATCH 2/2] fix Promise --- src/transporters/redis.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transporters/redis.js b/src/transporters/redis.js index 582937240..8cf636e75 100644 --- a/src/transporters/redis.js +++ b/src/transporters/redis.js @@ -1,6 +1,6 @@ /* * moleculer - * Copyright (c) 2020 MoleculerJS (https://github.com/moleculerjs/moleculer) + * Copyright (c) 2024 MoleculerJS (https://github.com/moleculerjs/moleculer) * MIT Licensed */ @@ -38,7 +38,7 @@ class RedisTransporter extends Transporter { * @memberof RedisTransporter */ connect() { - return new Promise((resolve, reject) => { + return new this.broker.Promise((resolve, reject) => { let clientSub = this.getRedisClient(this.opts); this._clientSub = clientSub; // For tests