File tree Expand file tree Collapse file tree 4 files changed +18
-16
lines changed Expand file tree Collapse file tree 4 files changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -85,16 +85,18 @@ class Logger {
8585 logger . error ( err . stack ) ;
8686 } ) ;
8787 taskLogger . startHealthCheck ( ) ;
88- taskLogger . onHealthCheckReported ( ( status ) => {
89- if ( status . status === 'failed' ) {
90- this . state . failedHealthChecks . push ( status ) ;
91- this . state . status = 'failed' ;
92- } else {
93- this . state . healthCheckStatus = status ;
94- }
95-
96- this . _writeNewState ( ) ;
97- } ) ;
88+ if ( taskLogger . onHealthCheckReported ) {
89+ taskLogger . onHealthCheckReported ( ( status ) => {
90+ if ( status . status === 'failed' ) {
91+ this . state . failedHealthChecks . push ( status ) ;
92+ this . state . status = 'failed' ;
93+ } else {
94+ this . state . healthCheckStatus = status ;
95+ }
96+
97+ this . _writeNewState ( ) ;
98+ } ) ;
99+ }
98100 taskLogger . on ( 'flush' , ( ) => {
99101 this . _updateMissingLogs ( ) ;
100102 this . _updateLastLoggingDate ( ) ;
Original file line number Diff line number Diff line change 66 " cf-container-logger"
77 ],
88 "dependencies" : {
9- "@codefresh-io/task-logger" : " 1.7.0 " ,
9+ "@codefresh-io/task-logger" : " 1.7.1 " ,
1010 "body-parser" : " ^1.19.0" ,
1111 "cf-errors" : " ^0.1.11" ,
1212 "cf-logs" : " ^1.1.0" ,
Original file line number Diff line number Diff line change 1- version : 1.4.0
1+ version : 1.4.1
Original file line number Diff line number Diff line change 22# yarn lockfile v1
33
44
5- " @codefresh-io/task-logger@1.7.0 " :
6- version "1.7.0 "
7- resolved "https://registry.yarnpkg.com/@codefresh-io/task-logger/-/task-logger-1.7.0 .tgz#61ff6f494718c2609312627f396d0e497b9065c2 "
8- integrity sha512-ITokP1p7OuRAmDn7MDj/KgHp68ser3R74hBAbUWcQVD3AToV07KSYl8iBQOQbCHsye+UVYzn4GzNF/Lmsri9VA ==
5+ " @codefresh-io/task-logger@1.7.1 " :
6+ version "1.7.1 "
7+ resolved "https://registry.yarnpkg.com/@codefresh-io/task-logger/-/task-logger-1.7.1 .tgz#356a728794f4063d7af2664ba72b32348d5f9a44 "
8+ integrity sha512-QigacjVXAGnryT7WOK+DjcgMI1jxQjg37qfZqzAsQbFLNyQRiWZY4kC/kv0UZd9F/4mj2Hg/LNCzGJNOaQc3SQ ==
99 dependencies :
1010 cf-errors "^0.1.11"
1111 crypto "0.0.3"
You can’t perform that action at this time.
0 commit comments