Adjusting how redis modules are loaded, making sure client is always set, before init.
This commit is contained in:
parent
3e8d7a8ae2
commit
68a2f9835e
|
@ -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