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

Commit

Permalink
added 5min longer timeout-s for all resources.
Browse files Browse the repository at this point in the history
  • Loading branch information
prekucki committed Oct 17, 2019
1 parent 16bae2c commit b6d442c
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit b6d442c

Please sign in to comment.