Added more logging for mongo db.
This commit is contained in:
parent
15c2f2982e
commit
675e1e6143
@ -44,6 +44,14 @@ class MongoServer {
|
||||
}
|
||||
return mongoose.connection;
|
||||
}
|
||||
|
||||
async disconnect() {
|
||||
if (!this.connected) return;
|
||||
logger.info('Disconnecting from MongoDB...');
|
||||
await mongoose.connection.close();
|
||||
this.connected = false;
|
||||
logger.info('Disconnected from MongoDB');
|
||||
}
|
||||
}
|
||||
|
||||
const mongoServer = new MongoServer();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user