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

Resources timeout wo #4798

Merged
merged 1 commit into from
Oct 18, 2019
Merged
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
5 changes: 3 additions & 2 deletions golem/network/hyperdrive/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

log = logging.getLogger(__name__)

GRACE_PERIOD = 300

def to_hyperg_peer(host: str, port: int) -> Dict[str, Tuple[str, int]]:
return {'TCP': (host, port)}
Expand Down Expand Up @@ -76,7 +77,7 @@ def add(self, files, client_options=None, **kwargs):
command='upload',
id=kwargs.get('id'),
files=files,
timeout=round_timeout(client_options.timeout)
timeout=round_timeout(client_options.timeout) + GRACE_PERIOD
)
return response['hash']

Expand Down Expand Up @@ -168,7 +169,7 @@ def add_async(
command='upload',
id=kwargs.get('id'),
files=files,
timeout=round_timeout(client_options.timeout),
timeout=round_timeout(client_options.timeout) + GRACE_PERIOD,
user=golem.tools.talkback.user(),
)
return self._async_request(
Expand Down