mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 13:21:37 +02:00
Placate the linter
GitOrigin-RevId: 064d796a5c3c49cfdacee5cf1a461d38f08425b3
This commit is contained in:
@@ -21,9 +21,16 @@ const connectionPromise = mongoose.connect(
|
||||
Settings.mongo.options
|
||||
)
|
||||
|
||||
connectionPromise.then(mongooseInstance => {
|
||||
Metrics.mongodb.monitor(mongooseInstance.connection.client)
|
||||
})
|
||||
connectionPromise
|
||||
.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 () => {
|
||||
await connectionPromise
|
||||
|
||||
Reference in New Issue
Block a user