fix: check for starting supervisor state
This commit is contained in:
parent
604e300dd0
commit
7f70b9d09a
1 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue