set timeout to 30s for mongodb
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const DeviceExcludeMode = {
|
||||
ZERO: Symbol("ZERO"),
|
||||
NINE: Symbol("NINE"),
|
||||
THREE: Symbol("THREE"),
|
||||
SIX: Symbol("SIX"),
|
||||
|
||||
@@ -24,12 +24,14 @@ function formatDate(date) {
|
||||
|
||||
return [year, month, day].join('-');
|
||||
}
|
||||
|
||||
const config = {
|
||||
connectTimeoutMS: 30000
|
||||
}
|
||||
class MongoManager {
|
||||
constructor() {
|
||||
//init mongoDb
|
||||
let uri = `mongodb://appointment:Rdv%402022@${MONGO_DB_URL}/appointment`
|
||||
this.client = new MongoClient(uri)
|
||||
this.client = new MongoClient(uri, config)
|
||||
}
|
||||
|
||||
async connect() {
|
||||
|
||||
Reference in New Issue
Block a user