Update handling for deployment requests with auction
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 32s
Deploy Test / Run deploy test suite (pull_request) Successful in 4m51s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 7m29s
Webapp Test / Run webapp test suite (pull_request) Failing after 2m16s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Successful in 5m30s
Smoke Test / Run basic test suite (pull_request) Successful in 3m43s
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 32s
Deploy Test / Run deploy test suite (pull_request) Successful in 4m51s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 7m29s
Webapp Test / Run webapp test suite (pull_request) Failing after 2m16s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Successful in 5m30s
Smoke Test / Run basic test suite (pull_request) Successful in 3m43s
This commit is contained in:
parent
0694c31807
commit
e9de97f371
@ -584,23 +584,32 @@ def command( # noqa: C901
|
||||
requests_to_check_for_payment.append(r)
|
||||
|
||||
requests_to_execute = []
|
||||
if min_required_payment:
|
||||
for r in requests_to_check_for_payment:
|
||||
if (not r.attributes.payment) and r.attributes.auction:
|
||||
if not auction_requests:
|
||||
main_logger.log(f"Skipping request {r.id}: not handling requests with auction.")
|
||||
dump_known_requests(state_file, [r], status="SKIP")
|
||||
else:
|
||||
# Check if we are in auction winners
|
||||
# Check if auction id is set
|
||||
if r.attributes.auction:
|
||||
if auction_requests:
|
||||
# Check if the deployer payment address is an auction winner
|
||||
auction_id = r.attributes.auction
|
||||
auction = laconic.get_auction(auction_id)
|
||||
if not auction:
|
||||
raise Exception(f"Unable to locate auction: {auction_id}")
|
||||
|
||||
if payment_address in auction.winnerAddresses:
|
||||
main_logger.log(f"{r.id}: Auction winnner address confirmed.")
|
||||
main_logger.log(
|
||||
f"Skipping request {r.id}: unable to locate auction: {auction_id}"
|
||||
)
|
||||
dump_known_requests(state_file, [r], status="SKIP")
|
||||
elif payment_address in auction.winnerAddresses:
|
||||
main_logger.log(f"{r.id}: auction winnner address confirmed.")
|
||||
requests_to_execute.append(r)
|
||||
else:
|
||||
main_logger.log(
|
||||
f"Skipping request {r.id}: deployer payment address not found in auction winners."
|
||||
)
|
||||
dump_known_requests(state_file, [r], status="SKIP")
|
||||
else:
|
||||
main_logger.log(
|
||||
f"Skipping request {r.id}: not handling requests with auction."
|
||||
)
|
||||
dump_known_requests(state_file, [r], status="SKIP")
|
||||
elif min_required_payment:
|
||||
main_logger.log(f"{r.id}: Confirming payment...")
|
||||
if confirm_payment(
|
||||
laconic,
|
||||
@ -617,7 +626,7 @@ def command( # noqa: C901
|
||||
)
|
||||
dump_known_requests(state_file, [r], status="UNPAID")
|
||||
else:
|
||||
requests_to_execute = requests_to_check_for_payment
|
||||
requests_to_execute.append(r)
|
||||
|
||||
main_logger.log(
|
||||
"Found %d unsatisfied request(s) to process." % len(requests_to_execute)
|
||||
|
@ -341,7 +341,7 @@ class LaconicRegistryClient:
|
||||
except: # noqa: E722
|
||||
pass
|
||||
|
||||
if len(results):
|
||||
if results and len(results):
|
||||
return results[0]
|
||||
|
||||
if require:
|
||||
|
Loading…
Reference in New Issue
Block a user