Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
fix(error-handling): Don't re-check flow for any error.
Browse files Browse the repository at this point in the history
The linter used to recheck flow when the server was initializing.
This could cause massive CPU usage.

closes #114
  • Loading branch information
nmn committed Sep 24, 2016
1 parent 33f8dff commit e1157fb
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ export default function check(
if (Date.now() - startTime > 10000) {
return '[]';
}
// Check for the common flow status messages and ignore them
if (errorM.indexOf('rechecking') !== -1 ||
errorM.indexOf('launching') !== -1 ||
errorM.indexOf('processing') !== -1 ||
errorM.indexOf('starting') !== -1 ||
errorM.indexOf('spawned') !== -1 ||
errorM.indexOf('logs') !== -1 ||
errorM.indexOf('initializing') !== -1
) {
return check(pathToFlow, args, options);
}
// // Check for the common flow status messages and ignore them
// if (errorM.indexOf('rechecking') !== -1 ||
// errorM.indexOf('launching') !== -1 ||
// errorM.indexOf('processing') !== -1 ||
// errorM.indexOf('starting') !== -1 ||
// errorM.indexOf('spawned') !== -1 ||
// errorM.indexOf('logs') !== -1 ||
// errorM.indexOf('initializing') !== -1
// ) {
// return check(pathToFlow, args, options);
// }
throw error;
});
}

0 comments on commit e1157fb

Please sign in to comment.