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

Fix RedisMock detection #974

Merged
merged 1 commit into from
Aug 7, 2023
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
fix RedisMock detection
  • Loading branch information
evantahler committed Aug 7, 2023
commit 5f14a137597c6b60063632048e035bdd2fff2094
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