From e06de5f4b72cfda092889a2c3e1c70563d158ca4 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Tue, 20 Aug 2024 18:19:22 -0500 Subject: [PATCH] Include payment in removal record --- .../deploy/webapp/undeploy_webapp_from_registry.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stack_orchestrator/deploy/webapp/undeploy_webapp_from_registry.py b/stack_orchestrator/deploy/webapp/undeploy_webapp_from_registry.py index 31cf115f..7dd6a9d5 100644 --- a/stack_orchestrator/deploy/webapp/undeploy_webapp_from_registry.py +++ b/stack_orchestrator/deploy/webapp/undeploy_webapp_from_registry.py @@ -38,6 +38,7 @@ def process_app_removal_request( deployment_parent_dir, delete_volumes, delete_names, + payment_address, ): deployment_record = laconic.get_record( app_removal_request.attributes.deployment, require=True @@ -83,8 +84,13 @@ def process_app_removal_request( "version": "1.0.0", "request": app_removal_request.id, "deployment": deployment_record.id, + "by": payment_address, } } + + if app_removal_request.attributes.payment: + removal_record["record"]["payment"] = app_removal_request.attributes.payment + laconic.publish(removal_record) if delete_names: @@ -330,6 +336,7 @@ def command( # noqa: C901 os.path.abspath(deployment_parent_dir), delete_volumes, delete_names, + payment_address, ) except Exception as e: main_logger.log(f"ERROR processing removal request {r.id}: {e}")