From 99718596d25a9a54a4ec93af0573bdc4af501293 Mon Sep 17 00:00:00 2001 From: Adw8 Date: Tue, 29 Oct 2024 09:25:06 +0530 Subject: [PATCH] Remove check for payments while processing undeployment requests --- .../webapp/undeploy_webapp_from_registry.py | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/stack_orchestrator/deploy/webapp/undeploy_webapp_from_registry.py b/stack_orchestrator/deploy/webapp/undeploy_webapp_from_registry.py index 90e62197..3e40ca9e 100644 --- a/stack_orchestrator/deploy/webapp/undeploy_webapp_from_registry.py +++ b/stack_orchestrator/deploy/webapp/undeploy_webapp_from_registry.py @@ -281,7 +281,7 @@ def command( # noqa: C901 else: one_per_deployment[r.attributes.deployment] = r - requests_to_check_for_payment = [] + requests_to_execute = [] for r in one_per_deployment.values(): try: if r.attributes.deployment not in named_deployments: @@ -306,7 +306,7 @@ def command( # noqa: C901 else: if r.id not in previous_requests: main_logger.log(f"Request {r.id} needs to processed.") - requests_to_check_for_payment.append(r) + requests_to_execute.append(r) else: main_logger.log( f"Skipping unsatisfied request {r.id} because we have seen it before." @@ -314,26 +314,6 @@ def command( # noqa: C901 except Exception as e: main_logger.log(f"ERROR examining {r.id}: {e}") - requests_to_execute = [] - # TODO: Handle requests with auction - if min_required_payment: - for r in requests_to_check_for_payment: - main_logger.log(f"{r.id}: Confirming payment...") - if confirm_payment( - laconic, - r, - payment_address, - min_required_payment, - main_logger, - ): - main_logger.log(f"{r.id}: Payment confirmed.") - requests_to_execute.append(r) - else: - main_logger.log(f"Skipping request {r.id}: unable to verify payment.") - dump_known_requests(state_file, [r]) - else: - requests_to_execute = requests_to_check_for_payment - main_logger.log( "Found %d unsatisfied request(s) to process." % len(requests_to_execute) )