File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ const seconds = parseInt((process.env.MONO_PERIOD || 3));
2222const time = seconds * 1000 ;
2323
2424if ( isAlways ) {
25- console . log ( `--always is enabled which means every ${ seconds } your service will be informed.` ) ;
25+ console . log ( `--always is enabled which means every ${ seconds } seconds your service will be informed.` ) ;
2626} else {
27- console . log ( `Your service will be informed every ${ seconds } when something is changed.` ) ;
27+ console . log ( `Your service will be informed every ${ seconds } seconds when something is changed.` ) ;
2828}
2929
3030const serviceUrl = process . env . MONO_SERVICE ;
@@ -53,7 +53,9 @@ const main = async () => {
5353 nnodes [ x . ID ] = {
5454 Id : x . ID ,
5555 Name : x . Description . Hostname ,
56- Ip : x . Status . Addr
56+ Ip : x . Status . Addr ,
57+ State : x . Status . State ,
58+ Availability : x . Spec . Availability
5759 } ;
5860 } ) ;
5961
@@ -88,7 +90,7 @@ const main = async () => {
8890
8991 let node = nnodes [ x . NodeID ] ;
9092
91- if ( ! node ) {
93+ if ( ! node || node . State !== NODE_STATES . READY || node . Availability !== NODE_STATES . ACTIVE ) {
9294 return ;
9395 }
9496
You can’t perform that action at this time.
0 commit comments