1
0
Fork 0
mirror of synced 2024-10-05 12:34:50 +13:00

Fix types

This commit is contained in:
Adria Navarro 2024-03-05 17:19:26 +01:00
parent 38d557ea1c
commit 8f9e8b60c3

View file

@ -28,7 +28,7 @@ const DEFAULT_SELECT_DB = SelectableDatabase.DEFAULT
// for testing just generate the client once // for testing just generate the client once
let CLOSED = false let CLOSED = false
const CLIENTS: Record<number, Redis | Cluster> = {} const CLIENTS: Record<number, Redis> = {}
let CONNECTED = false let CONNECTED = false
// mock redis always connected // mock redis always connected
@ -201,7 +201,7 @@ class RedisWrapper {
key = `${db}${SEPARATOR}${key}` key = `${db}${SEPARATOR}${key}`
let stream let stream
if (CLUSTERED) { if (CLUSTERED) {
let node = (this.getClient() as Cluster).nodes("master") let node = (this.getClient() as never as Cluster).nodes("master")
stream = node[0].scanStream({ match: key + "*", count: 100 }) stream = node[0].scanStream({ match: key + "*", count: 100 })
} else { } else {
stream = (this.getClient() as Redis).scanStream({ stream = (this.getClient() as Redis).scanStream({