Skip to content

Commit

Permalink
Merge pull request #452 from ExchangeUnion/better-status-commands
Browse files Browse the repository at this point in the history
better status messages
  • Loading branch information
raladev authored May 11, 2020
2 parents 646081f + 8d3ba7b commit 603940a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions images/utils/launcher/node/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,11 @@ def update_status(node, status):

def status_wrapper(container, name, update_status):
status = container.status()
if status.startswith("could not connect"):
update_status(name, "Waiting for xud...")
sleep(5)
status = container.status()

update_status(name, status)

class State:
Expand Down
2 changes: 1 addition & 1 deletion images/utils/launcher/node/bitcoind.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def status(self):
return str(e)
except:
self._logger.exception("Failed to get advanced running status")
return "Container running"
return "Waiting for bitcoind to come up..."
else:
return status

Expand Down
2 changes: 1 addition & 1 deletion images/utils/launcher/node/btcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def status(self):
return "Syncing %.2f (%d/%d)" % (current / total, current, total)
except:
self._logger.exception("Failed to get advanced running status")
return "Container running"
return "Waiting for {} to come up...".format("ltcd" if self.litecoin else "btcd")
else:
return status

Expand Down
2 changes: 1 addition & 1 deletion images/utils/launcher/node/geth.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,6 @@ def status(self):
return "Ready"
except:
self._logger.exception("Failed to get advanced running status")
return "Container running"
return "Waiting for geth to come up..."
else:
return status
2 changes: 1 addition & 1 deletion images/utils/launcher/node/lnd.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def status(self):
return "Wallet locked. Unlock with xucli unlock."
except:
self._logger.exception("Failed to get advanced running status")
return "Container running"
return "Waiting for lnd ({}) to come up...".format(self.chain)
else:
return status

Expand Down
4 changes: 2 additions & 2 deletions images/utils/launcher/node/raiden.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ def status(self):
# Waiting for the ethereum node to synchronize. [Use ^C to exit]
return "Waiting for sync"
else:
return "Container running"
return "Waiting for raiden to come up..."
self._logger.exception("Failed to get advanced running status")
return str(e)
except:
self._logger.exception("Failed to get advanced running status")
return "Container running"
return "Waiting for raiden to come up..."
else:
return status
2 changes: 1 addition & 1 deletion images/utils/launcher/node/xud.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def status(self):
return str(e)
except:
self._logger.exception("Failed to get advanced running status")
return "Container running"
return "Waiting for xud to come up..."
else:
return status

Expand Down

0 comments on commit 603940a

Please sign in to comment.