Skip to content

Commit

Permalink
fix(redis-4): add support to new version of redis (#1324)
Browse files Browse the repository at this point in the history
* fix(redis-4): removed support for redis >4.5.1 (client >1.4.2) who breaks the CI)

* fix(redis-4): added new wrap to MULTI function

* fix(redis-4): added new wrap to MULTI function

* fix(redis-4): fixed Amir's CR
  • Loading branch information
osherv authored Dec 20, 2022
1 parent a116303 commit 378f130
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,15 @@ export class RedisInstrumentation extends InstrumentationBase<any> {
this._getPatchRedisClientMulti()
);

if (isWrapped(redisClientPrototype?.MULTI)) {
this._unwrap(redisClientPrototype, 'MULTI');
}
this._wrap(
redisClientPrototype,
'MULTI',
this._getPatchRedisClientMulti()
);

if (isWrapped(redisClientPrototype?.sendCommand)) {
this._unwrap(redisClientPrototype, 'sendCommand');
}
Expand All @@ -198,6 +207,9 @@ export class RedisInstrumentation extends InstrumentationBase<any> {
if (isWrapped(redisClientPrototype?.multi)) {
this._unwrap(redisClientPrototype, 'multi');
}
if (isWrapped(redisClientPrototype?.MULTI)) {
this._unwrap(redisClientPrototype, 'MULTI');
}
if (isWrapped(redisClientPrototype?.sendCommand)) {
this._unwrap(redisClientPrototype, 'sendCommand');
}
Expand Down

0 comments on commit 378f130

Please sign in to comment.