File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,16 @@ const arsenal = require('arsenal');
44const { config } = require ( './lib/Config.js' ) ;
55const logger = require ( './lib/utilities/logger' ) ;
66
7+ process . on ( 'uncaughtException' , err => {
8+ logger . fatal ( 'caught error' , {
9+ error : err . message ,
10+ stack : err . stack ,
11+ workerId : this . worker ? this . worker . id : undefined ,
12+ workerPid : this . worker ? this . worker . process . pid : undefined ,
13+ } ) ;
14+ process . exit ( 1 ) ;
15+ } ) ;
16+
717if ( config . backends . data === 'file' ||
818 ( config . backends . data === 'multiple' &&
919 config . backends . metadata !== 'scality' ) ) {
Original file line number Diff line number Diff line change 33const { config } = require ( './lib/Config.js' ) ;
44const MetadataFileServer =
55 require ( 'arsenal' ) . storage . metadata . MetadataFileServer ;
6+ const logger = require ( './lib/utilities/logger' ) ;
7+
8+ process . on ( 'uncaughtException' , err => {
9+ logger . fatal ( 'caught error' , {
10+ error : err . message ,
11+ stack : err . stack ,
12+ workerId : this . worker ? this . worker . id : undefined ,
13+ workerPid : this . worker ? this . worker . process . pid : undefined ,
14+ } ) ;
15+ process . exit ( 1 ) ;
16+ } ) ;
617
718if ( config . backends . metadata === 'file' ) {
819 const mdServer = new MetadataFileServer (
You can’t perform that action at this time.
0 commit comments