add logs for checkHealth

This commit is contained in:
Alexander.Trofimov
2017-05-12 12:07:17 +03:00
parent b031410431
commit fdc8799712

View File

@ -44,6 +44,7 @@ var idCheckInterval, c_nCheckHealth = 60000, c_sCheckWord = 'color', c_sCheckLan
var canStartCheck = true; var canStartCheck = true;
var statusCheckHealth = true; var statusCheckHealth = true;
function checkHealth (worker) { function checkHealth (worker) {
logger.info('checkHealth');
if (!statusCheckHealth) { if (!statusCheckHealth) {
logger.error('error check health, restart!'); logger.error('error check health, restart!');
worker.kill(); worker.kill();
@ -53,6 +54,7 @@ function checkHealth (worker) {
statusCheckHealth = false; statusCheckHealth = false;
} }
function endCheckHealth (msg) { function endCheckHealth (msg) {
logger.info('endCheckHealth');
statusCheckHealth = true; statusCheckHealth = true;
} }