diff --git a/lib/pull.js b/lib/pull.js index 42f6688..8e6823d 100644 --- a/lib/pull.js +++ b/lib/pull.js @@ -28,17 +28,24 @@ function pullTask() { request(options, function(error, response, body) { if (error) { - logger.warn('Error pulling task from CORE', {error: error}); + if (matrix.core_is_healthy) { + logger.warn('Error pulling task from CORE', {error: error}); + } matrix.core_is_healthy = false; return; } if (response.statusCode != 200) { - logger.warn('CORE http response status code for pull task is not 200', {http_response_status: response.statusCode}); + if (matrix.core_is_healthy) { + logger.warn('CORE http response status code for pull task is not 200', {http_response_status: response.statusCode}); + } matrix.core_is_healthy = false; return; } + if (!matrix.core_is_healthy) { + logger.verbose('CORE is healthy'); + } matrix.core_is_healthy = true; if (body == 'NONE') {