Skip to content

Commit

Permalink
fix RedisMock detection (#974)
Browse files Browse the repository at this point in the history
  • Loading branch information
evantahler authored Aug 7, 2023
1 parent fc4f506 commit c703c00
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,13 @@ export class Scheduler extends EventEmitter {
}

private canWatch() {
if (this.connection.redis?.constructor?.name === "RedisMock") return false;
if (
["RedisMock", "_RedisMock"].includes(
this.connection.redis?.constructor?.name,
)
) {
return false;
}
if (typeof this.connection.redis.unwatch !== "function") return false;
return true;
}
Expand Down

0 comments on commit c703c00

Please sign in to comment.