Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't plugging third-party Promise library for ioredis in RedisTransporter #1290

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/transporters/redis.js
Original file line number Diff line number Diff line change
@@ -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
*/

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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(
Expand Down
Loading