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
|
// we init this as we want to keep the connection open all the time
|
||||||
// reduces the performance hit
|
// reduces the performance hit
|
||||||
exports.init = async () => {
|
exports.init = async () => {
|
||||||
devAppClient = await new Client(utils.Databases.DEV_LOCKS).init()
|
devAppClient = new Client(utils.Databases.DEV_LOCKS)
|
||||||
debounceClient = await new Client(utils.Databases.DEBOUNCE).init()
|
debounceClient = new Client(utils.Databases.DEBOUNCE)
|
||||||
|
await devAppClient.init()
|
||||||
|
await debounceClient.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.shutdown = async () => {
|
exports.shutdown = async () => {
|
||||||
|
|
|
@ -43,8 +43,10 @@ async function getACode(db, code, deleteCode = true) {
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.init = async () => {
|
exports.init = async () => {
|
||||||
pwResetClient = await new Client(utils.Databases.PW_RESETS).init()
|
pwResetClient = new Client(utils.Databases.PW_RESETS)
|
||||||
invitationClient = await new Client(utils.Databases.INVITATIONS).init()
|
invitationClient = new Client(utils.Databases.INVITATIONS)
|
||||||
|
await pwResetClient.init()
|
||||||
|
await invitationClient.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue