Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

multi core on wasm #4934

Merged
merged 8 commits into from
Nov 26, 2019
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 apps/wasm/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ class WasmTaskEnvironment(DockerEnvironment):
DOCKER_TAG = "0.5.4"
ENV_ID = "WASM"
SHORT_DESCRIPTION = "WASM Sandbox"

@classmethod
def is_single_core(cls):
return True
5 changes: 5 additions & 0 deletions golem/environments/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ def check_support(self) -> SupportStatus:
"""
return SupportStatus.ok()

@classmethod
def is_single_core(cls) -> bool:
""" Returns true if task runs on single cpu core """
return False

def is_accepted(self) -> bool:
""" Check if user wants to compute tasks from this environment """
return self.accept_tasks
Expand Down
3 changes: 2 additions & 1 deletion golem/marketplace/marketplace.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def calculate_budget(cls, wtct: WantToComputeTask) -> int:

class ProviderMarketStrategy(ABC):

@abstractclassmethod
@classmethod
@abstractmethod
def calculate_price(cls, pricing: ProviderPricing, max_price: int,
requestor_id: str) -> int:
raise NotImplementedError()
Expand Down
Loading