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