Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/aleph/vm/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ def controller_service(self) -> str:
def uses_payment_stream(self) -> bool:
return self.message.payment and self.message.payment.is_stream

@property
def uses_payment_credit(self) -> bool:
return self.message.payment and self.message.payment.is_credit

@property
def has_resources(self) -> bool:
assert self.vm, "The VM attribute has to be set before calling has_resources()"
Expand Down
1 change: 1 addition & 0 deletions src/aleph/vm/orchestrator/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ async def update_allocations(request: web.Request):
execution.vm_hash not in allocations
and execution.is_running
and not execution.uses_payment_stream
and not execution.uses_payment_credit
and not execution.gpus
and not execution.is_confidential
):
Expand Down
Loading