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

Commit

Permalink
b0.22 - task-api - Take peers from resources_options['options'] (#4937)
Browse files Browse the repository at this point in the history
* Fix remote peers in new resource manager

* try to use the child options object

* review comment, safe dict access
  • Loading branch information
maaktweluit authored and mfranciszkiewicz committed Nov 26, 2019
1 parent 27b96c6 commit 8f0ffdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions golem/resource/resourcemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ def __init__(

def build_client_options(
self,
peers: Optional[Peers] = None,
**kwargs,
) -> ClientOptions:
""" Return client-specific request options """

return self._client.build_options(
peers=peers, **kwargs)
return self._client.build_options(**kwargs)

@inlineCallbacks
def share(
Expand Down
4 changes: 2 additions & 2 deletions golem/task/taskserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,9 @@ def task_given(

if task_header.environment_prerequisites:
subtask_inputs_dir = self.task_computer.get_subtask_inputs_dir()
resources_options = msg.resources_options or dict()
resources_options = msg.resources_options or dict(options={})
client_options = self.resource_manager.build_client_options(
**resources_options)
**resources_options.get('options', {}))

deferred_list = [
self.new_resource_manager.download(
Expand Down

0 comments on commit 8f0ffdd

Please sign in to comment.