fix: harden multi-instance scheduler and worker execution
This commit is contained in:
1 parent
df7dcd3a9c
commit
60a006008a
23 files changed
+1442
-299
No files matched your search
@@ -19,13 +19,17 @@ export function resolveMongoAppName(
|
||||
export function resolveMongoConnectionOptions(
|
||||
dbName: string,
|
||||
appName: string,
|
||||
mongoAutoIndex = process.env.MONGODB_AUTO_INDEX,
|
||||
): mongoose.ConnectOptions {
|
||||
const shouldEnableMongoAutoIndex =
|
||||
mongoAutoIndex?.trim().toLowerCase() === 'true';
|
||||
|
||||
return {
|
||||
dbName,
|
||||
appName,
|
||||
minPoolSize: 10,
|
||||
maxPoolSize: 20,
|
||||
autoIndex: false,
|
||||
autoIndex: shouldEnableMongoAutoIndex,
|
||||
autoCreate: false,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user