Adjusting how redis modules are loaded, making sure client is always set, before init.
This commit is contained in:
parent
26582f5ceb
commit
7588bfde39
|
@ -7,8 +7,10 @@ let devAppClient, debounceClient
|
|||
// we init this as we want to keep the connection open all the time
|
||||
// reduces the performance hit
|
||||
exports.init = async () => {
|
||||
devAppClient = await new Client(utils.Databases.DEV_LOCKS).init()
|
||||
debounceClient = await new Client(utils.Databases.DEBOUNCE).init()
|
||||
devAppClient = new Client(utils.Databases.DEV_LOCKS)
|
||||
debounceClient = new Client(utils.Databases.DEBOUNCE)
|
||||
await devAppClient.init()
|
||||
await debounceClient.init()
|
||||
}
|
||||
|
||||
exports.shutdown = async () => {
|
||||
|
|
|
@ -43,8 +43,10 @@ async function getACode(db, code, deleteCode = true) {
|
|||
}
|
||||
|
||||
exports.init = async () => {
|
||||
pwResetClient = await new Client(utils.Databases.PW_RESETS).init()
|
||||
invitationClient = await new Client(utils.Databases.INVITATIONS).init()
|
||||
pwResetClient = new Client(utils.Databases.PW_RESETS)
|
||||
invitationClient = new Client(utils.Databases.INVITATIONS)
|
||||
await pwResetClient.init()
|
||||
await invitationClient.init()
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue