chore(deprecations): clean out some warnings

This commit is contained in:
Sabe Jones
2024-02-05 16:50:06 -06:00
parent 2ba74f1645
commit f74160c16a
2 changed files with 8 additions and 9 deletions

View File

@@ -23,15 +23,14 @@ export function getDevelopmentConnectionUrl (originalConnectionUrl) {
}
export function getDefaultConnectionOptions () {
// with keepAlive deprecated, we don't need a separate set of production options
// Keeping the structure here in case the distinction is useful later
const commonOptions = {
useNewUrlParser: true,
useUnifiedTopology: true,
};
return !IS_PROD ? commonOptions : {
// See https://mongoosejs.com/docs/connections.html#keepAlive
keepAlive: true,
keepAliveInitialDelay: 300000,
...commonOptions,
};
}