From 7f70b9d09a7f0c113d71fcdfb97bb9536dbbf9ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Oliveira?= Date: Thu, 10 Feb 2022 00:54:50 +0000 Subject: [PATCH] fix: check for starting supervisor state --- bin/lamassu-update-wallet-nodes | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/lamassu-update-wallet-nodes b/bin/lamassu-update-wallet-nodes index 6c568ccb..2a40bb25 100644 --- a/bin/lamassu-update-wallet-nodes +++ b/bin/lamassu-update-wallet-nodes @@ -6,6 +6,8 @@ const { utils: coinUtils } = require('lamassu-coins') const cryptos = coinUtils.cryptoCurrencies() +const supervisorStates = ['RUNNING', 'STARTING'] + const PLUGINS = { BTC: require('../lib/blockchain/bitcoin.js'), LTC: require('../lib/blockchain/litecoin.js'), @@ -28,7 +30,7 @@ function run () { const cryptoPlugin = plugin(crypto) const status = common.es(`sudo supervisorctl status ${crypto.code} | awk '{ print $2 }'`).trim() - cryptoPlugin.updateCore(common.getBinaries(crypto.cryptoCode), status === 'RUNNING') + cryptoPlugin.updateCore(common.getBinaries(crypto.cryptoCode), _.includes(status, supervisorStates)) }, cryptos) }