Commit cce03c1feb3a7526b720bd50a6676df81aec8fff
1 parent
ba57a43bf6
Exists in
master
healthy core status
Showing 1 changed file with 9 additions and 2 deletions Side-by-side Diff
lib/pull.js
... | ... | @@ -28,17 +28,24 @@ function pullTask() { |
28 | 28 | |
29 | 29 | request(options, function(error, response, body) { |
30 | 30 | if (error) { |
31 | - logger.warn('Error pulling task from CORE', {error: error}); | |
31 | + if (matrix.core_is_healthy) { | |
32 | + logger.warn('Error pulling task from CORE', {error: error}); | |
33 | + } | |
32 | 34 | matrix.core_is_healthy = false; |
33 | 35 | return; |
34 | 36 | } |
35 | 37 | |
36 | 38 | if (response.statusCode != 200) { |
37 | - logger.warn('CORE http response status code for pull task is not 200', {http_response_status: response.statusCode}); | |
39 | + if (matrix.core_is_healthy) { | |
40 | + logger.warn('CORE http response status code for pull task is not 200', {http_response_status: response.statusCode}); | |
41 | + } | |
38 | 42 | matrix.core_is_healthy = false; |
39 | 43 | return; |
40 | 44 | } |
41 | 45 | |
46 | + if (!matrix.core_is_healthy) { | |
47 | + logger.verbose('CORE is healthy'); | |
48 | + } | |
42 | 49 | matrix.core_is_healthy = true; |
43 | 50 | |
44 | 51 | if (body == 'NONE') { |