File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ operationExecutor
173173. then ( ( ) => process . exit ( 0 ) )
174174. catch ( err => {
175175 console . log ( 'err' , err ) ;
176- let eGroup = logger . group ( 'error' ) ;
176+ let eGroup = logger . group ( 'fatal- error' ) ;
177177 if ( err . message ) {
178178 eGroup . log ( err . message ) ;
179179 eGroup . log ( err . stack ) ;
@@ -183,7 +183,10 @@ operationExecutor
183183 logger . toFile ( `${ WORK_DIR } /process.log` ) ;
184184 operation . log ( opCodes . OP_ERROR , { error : err . message || err } )
185185 . then ( ( ) => operation . finish ( ) )
186- . then ( ( ) => process . exit ( 1 ) , ( ) => process . exit ( 1 ) ) ;
186+ . then ( ( ) => process . exit ( 1 ) )
187+ // If it errors again exit.
188+ // This is especially important in the case of DB errors.
189+ . catch ( ( ) => process . exit ( 1 ) ) ;
187190} ) ;
188191
189192//
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ switch (STORAGE_ENGINE) {
2424 break ;
2525 case 's3' :
2626 minioClient = new Minio . Client ( {
27+ // Endpoint gets updated based on region.
2728 endPoint : 's3.amazonaws.com' ,
29+ region : STORAGE_REGION ,
2830 accessKey : STORAGE_ACCESS_KEY ,
2931 secretKey : STORAGE_SECRET_KEY
3032 } ) ;
You can’t perform that action at this time.
0 commit comments