File tree 1 file changed +4
-12
lines changed
1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -1088,23 +1088,15 @@ var pluginManager = function pluginManager() {
1088
1088
* @returns {object } db connection params
1089
1089
**/
1090
1090
this . dbConnection = function ( config ) {
1091
- if ( process . argv [ 1 ] . endsWith ( 'executor.js' ) ) {
1092
- if ( ! config || ! config . mongodb ) {
1093
- console . log ( '************************************ executor.js common.db *********************************** no config' , process . argv ) ;
1094
- return this . singleDefaultConnection ( ) ;
1095
- }
1096
- else if ( ( typeof config . mongodb === 'string' && config . mongodb . indexOf ( 'maxPoolSize=3' ) === - 1 ) ||
1097
- ( typeof config . mongodb === 'object' && config . mongodb . max_pool_size !== 3 ) ) {
1098
- console . log ( '************************************ executor.js common.db *********************************** wrong pool size' , process . argv ) ;
1099
- return this . singleDefaultConnection ( ) ;
1100
- }
1101
- }
1102
-
1103
1091
var db , maxPoolSize = 10 ;
1092
+
1104
1093
if ( ! cluster . isMaster ) {
1105
1094
//we are in worker
1106
1095
maxPoolSize = 100 ;
1107
1096
}
1097
+ if ( process . argv [ 1 ] . endsWith ( 'executor.js' ) ) {
1098
+ maxPoolSize = 3 ;
1099
+ }
1108
1100
if ( typeof config === "string" ) {
1109
1101
db = config ;
1110
1102
if ( this . dbConfigFiles [ config ] ) {
You can’t perform that action at this time.
0 commit comments