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