mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Placate the linter
GitOrigin-RevId: 064d796a5c3c49cfdacee5cf1a461d38f08425b3
This commit is contained in:
parent
4e2bfd58a1
commit
d4cc50bc21
1 changed files with 10 additions and 3 deletions
|
@ -21,9 +21,16 @@ const connectionPromise = mongoose.connect(
|
||||||
Settings.mongo.options
|
Settings.mongo.options
|
||||||
)
|
)
|
||||||
|
|
||||||
connectionPromise.then(mongooseInstance => {
|
connectionPromise
|
||||||
Metrics.mongodb.monitor(mongooseInstance.connection.client)
|
.then(mongooseInstance => {
|
||||||
})
|
Metrics.mongodb.monitor(mongooseInstance.connection.client)
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
logger.error(
|
||||||
|
{ error },
|
||||||
|
'Failed to connect to MongoDB - cannot set up monitoring'
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
addConnectionDrainer('mongoose', async () => {
|
addConnectionDrainer('mongoose', async () => {
|
||||||
await connectionPromise
|
await connectionPromise
|
||||||
|
|
Loading…
Reference in a new issue