From 8d3ba7be6867b9b78fec47be2c6899accf258682 Mon Sep 17 00:00:00 2001 From: Hannah Date: Sat, 9 May 2020 18:23:14 +0000 Subject: [PATCH] better status messages --- images/utils/launcher/node/__init__.py | 5 +++++ images/utils/launcher/node/bitcoind.py | 2 +- images/utils/launcher/node/btcd.py | 2 +- images/utils/launcher/node/geth.py | 2 +- images/utils/launcher/node/lnd.py | 2 +- images/utils/launcher/node/raiden.py | 4 ++-- images/utils/launcher/node/xud.py | 2 +- 7 files changed, 12 insertions(+), 7 deletions(-) diff --git a/images/utils/launcher/node/__init__.py b/images/utils/launcher/node/__init__.py index 7e48f3417..d41d87600 100644 --- a/images/utils/launcher/node/__init__.py +++ b/images/utils/launcher/node/__init__.py @@ -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: diff --git a/images/utils/launcher/node/bitcoind.py b/images/utils/launcher/node/bitcoind.py index 480d15de2..3506c32c2 100644 --- a/images/utils/launcher/node/bitcoind.py +++ b/images/utils/launcher/node/bitcoind.py @@ -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 diff --git a/images/utils/launcher/node/btcd.py b/images/utils/launcher/node/btcd.py index 835a8badf..7d299b938 100644 --- a/images/utils/launcher/node/btcd.py +++ b/images/utils/launcher/node/btcd.py @@ -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 diff --git a/images/utils/launcher/node/geth.py b/images/utils/launcher/node/geth.py index 901685a24..ff1dba878 100644 --- a/images/utils/launcher/node/geth.py +++ b/images/utils/launcher/node/geth.py @@ -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 diff --git a/images/utils/launcher/node/lnd.py b/images/utils/launcher/node/lnd.py index 149ec1569..bc8cb48cd 100644 --- a/images/utils/launcher/node/lnd.py +++ b/images/utils/launcher/node/lnd.py @@ -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 diff --git a/images/utils/launcher/node/raiden.py b/images/utils/launcher/node/raiden.py index 3dccdd382..00e1a6248 100644 --- a/images/utils/launcher/node/raiden.py +++ b/images/utils/launcher/node/raiden.py @@ -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 diff --git a/images/utils/launcher/node/xud.py b/images/utils/launcher/node/xud.py index 3a2a85cf6..99e1fee85 100644 --- a/images/utils/launcher/node/xud.py +++ b/images/utils/launcher/node/xud.py @@ -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