1
0
Fork 0
mirror of synced 2024-07-06 15:00:49 +12:00

Use typed redis clients

This commit is contained in:
Adria Navarro 2024-03-05 15:10:51 +01:00
parent bc8fdeea6a
commit e076c0e5f5

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
let CLIENTS: { [key: number]: any } = {} const CLIENTS: Record<number, Redis> = {}
let CONNECTED = false let CONNECTED = false
// mock redis always connected // mock redis always connected
@ -36,7 +36,7 @@ if (env.MOCK_REDIS) {
CONNECTED = true CONNECTED = true
} }
function pickClient(selectDb: number): any { function pickClient(selectDb: number) {
return CLIENTS[selectDb] return CLIENTS[selectDb]
} }