forked from cerc-io/stack-orchestrator
Remove check for payments while processing undeployment requests
This commit is contained in:
parent
5f8e809b2d
commit
1f41c1b1e1
@ -25,7 +25,6 @@ from stack_orchestrator.deploy.webapp.util import (
|
||||
LaconicRegistryClient,
|
||||
match_owner,
|
||||
skip_by_tag,
|
||||
confirm_payment,
|
||||
)
|
||||
|
||||
main_logger = TimedLogger(file=sys.stderr)
|
||||
@ -281,7 +280,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 +305,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 +313,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)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user