def get_dojo_status(): # Find dojo status dojo_status = "Disabled" dojo_status_color = "gray" if is_installing_docker_images(): dojo_status = "Installing..." dojo_status_color = "yellow" dojo_initialized = "" return dojo_status, dojo_status_color, dojo_initialized try: dojo_initialized = subprocess.check_output("docker inspect --format={{.State.Running}} db", shell=True) dojo_initialized = dojo_initialized.strip() except: dojo_initialized = "" if is_dojo_enabled(): if dojo_initialized != "false": if is_electrs_active(): dojo_status = "Running" dojo_status_color = "green" else: dojo_status = "Waiting on Electrum..." dojo_status_color = "yellow" else: dojo_status = "Issue Starting" dojo_status_color = "red" dojo_initialized = "" return dojo_status, dojo_status_color, dojo_initialized
def get_dojo_status(): # Find dojo status dojo_status = "Disabled" dojo_status_color = "gray" if is_installing_docker_images(): dojo_status = "Installing..." dojo_status_color = "yellow" return dojo_status, dojo_status_color if is_testnet_enabled(): dojo_status = "Requires Mainnet" dojo_status_color = "gray" return dojo_status, dojo_status_color init = is_dojo_initialized() if is_service_enabled("dojo"): if init: if is_electrs_active(): dojo_status = "Running" dojo_status_color = "green" else: dojo_status = "Waiting on Electrum..." dojo_status_color = "yellow" else: dojo_status = "Issue Starting" dojo_status_color = "red" return dojo_status, dojo_status_color
def get_btcrpcexplorer_status_and_color_and_ready(): status = "BTC RPC Explorer" color = "gray" ready = False if is_btcrpcexplorer_enabled(): if is_bitcoind_synced(): if is_electrs_active(): color = get_service_status_color("btc_rpc_explorer") status_code = get_service_status_code("btc_rpc_explorer") if status_code == 0: ready = True else: color = "yellow" status = "Waiting on Electrum..." else: color = "yellow" status = "Waiting on bitcoin..." return status, color, ready