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

Commit

Permalink
multi core on wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
prekucki committed Nov 25, 2019
1 parent e18581b commit 4c24892
Show file tree
Hide file tree
Showing 14 changed files with 518 additions and 377 deletions.
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: 1 addition & 2 deletions golem/ethereum/incomeskeeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ def received_batch_transfer(
if expected_value != amount:
logger.warning(
'Batch transfer amount does not match, expected %r, got %r',
expected_value / denoms.ether,
amount / denoms.ether)
expected_value / denoms.ether, amount / denoms.ether)

amount_left = amount

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

0 comments on commit 4c24892

Please sign in to comment.