From cbdf9ff3fe938b9cdad34febe29564b8d014c430 Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Tue, 18 Jun 2024 16:02:00 +0300 Subject: [PATCH] deleted state check added for pause services on startup --- operate/cli.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/operate/cli.py b/operate/cli.py index 646435a33..64a7bfd21 100644 --- a/operate/cli.py +++ b/operate/cli.py @@ -42,7 +42,7 @@ from operate.account.user import UserAccount from operate.constants import KEY, KEYS, OPERATE, SERVICES from operate.ledger import get_ledger_type_from_chain_type -from operate.types import ChainType +from operate.types import ChainType, DeploymentStatus from operate.wallet.master import MasterWalletManager @@ -186,8 +186,10 @@ def pause_all_services_on_startup(): for service in services: if not operate.service_manager().exists(service=service): continue - logger.info(f"stopping service {service}") deployment = operate.service_manager().create_or_load(service).deployment + if deployment.status == DeploymentStatus.DELETED: + continue + logger.info(f"stopping service {service}") deployment.stop(force=True) logger.info(f"Cancelling funding job for {service}") cancel_funding_job(service=service)