Include payment in removal record
Some checks failed
Lint Checks / Run linter (pull_request) Failing after 34s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m13s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m53s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Successful in 7m6s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 7m58s
Smoke Test / Run basic test suite (pull_request) Successful in 4m8s

This commit is contained in:
Thomas E Lackey 2024-08-20 18:19:22 -05:00
parent 6e64b60295
commit e06de5f4b7

View File

@ -38,6 +38,7 @@ def process_app_removal_request(
deployment_parent_dir, deployment_parent_dir,
delete_volumes, delete_volumes,
delete_names, delete_names,
payment_address,
): ):
deployment_record = laconic.get_record( deployment_record = laconic.get_record(
app_removal_request.attributes.deployment, require=True app_removal_request.attributes.deployment, require=True
@ -83,8 +84,13 @@ def process_app_removal_request(
"version": "1.0.0", "version": "1.0.0",
"request": app_removal_request.id, "request": app_removal_request.id,
"deployment": deployment_record.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) laconic.publish(removal_record)
if delete_names: if delete_names:
@ -330,6 +336,7 @@ def command( # noqa: C901
os.path.abspath(deployment_parent_dir), os.path.abspath(deployment_parent_dir),
delete_volumes, delete_volumes,
delete_names, delete_names,
payment_address,
) )
except Exception as e: except Exception as e:
main_logger.log(f"ERROR processing removal request {r.id}: {e}") main_logger.log(f"ERROR processing removal request {r.id}: {e}")