From 3febab75f5a0c8cdd80bd6e57cdb353e4244cff1 Mon Sep 17 00:00:00 2001 From: Jaka Pust Date: Wed, 14 Feb 2024 08:34:55 +0100 Subject: [PATCH] Proper binary name is alert-system --- start_aks_bsv.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/start_aks_bsv.py b/start_aks_bsv.py index e6fa7b3..39a5f83 100755 --- a/start_aks_bsv.py +++ b/start_aks_bsv.py @@ -30,7 +30,7 @@ Steps of the script: - Sends a http GET/health request to the host (localhost or ) to check if the Alert System Microservice (ASM) is up and running -- If ASM is not yet up and running, it starts the alert_system binary (locally or via SSH) +- If ASM is not yet up and running, it starts the alert-system binary (locally or via SSH) - Waits up to 60 seconds to receive the "synced": true in the GET/health JSON response - Reports any issues with running the ASM - If ASM is up and running, runs the bitcoin-cli command to check if the bitcoind process is running @@ -43,7 +43,7 @@ ALERT_SYSTEM_DISABLE_RPC_VERIFICATION=true environment variable must be set. Micro service should not check the RPC connection if it is started before the node. The following binaries must exist and be found by the system: -- alert_system +- alert-system - bitcoin-cli - bitcoind This can be done by either setting the PATH environment variable or create symlinks into the /usr/bin for example. @@ -105,7 +105,7 @@ def run(self, command, blocking=True, stderr=None): class ASM: # Representing the Alert System Microservice. def __init__(self, port=None, ssh_args={}, timeout=60): self.timeout = timeout - self.command = ["alert_system"] + self.command = ["alert-system"] # default port if port is None: port = 3000 @@ -123,7 +123,7 @@ def wait_for_synced(self, process=None): wait_until = time.time() + self.timeout while time.time() < wait_until: if process is not None: - # Check if process (either ssh or alert_system) already terminated while waiting for health status + # Check if process (either ssh or alert-system) already terminated while waiting for health status return_code = process.process.poll() if return_code is not None: command = self.command @@ -169,7 +169,7 @@ def run(self): process = self.ssh.process else: process = Process(self.command) - # We want to get the stderr to be able to report any alert_system issues + # We want to get the stderr to be able to report any alert-system issues process.open(blocking=False, stderr=subprocess.PIPE) report("Waiting for the ASM to be synced...") self.wait_for_synced(process)