Conversation
Make sure the the `timeout` parameter is passed to requests before making an HTTP request. By default we use (5,5) which means 5 seconds for connect and read timeouts.
|
LGTM, 5 seconds is a decent default, IIRC the read timeout is not for completion, just for byte gaps. I think it's going to be rarely set, but may be useful in some specific cases. |
To avoid this warning:
```
ckanapi/ckanapi/cli/load.py:307: SyntaxWarning: "\." is an invalid
escape sequence. Such sequences will not work in the
future. Did you mean "\\."? A raw string is also an option.
new_name = re.sub('[0-9\.-]','',name)
```
|
How does this interact with someone setting the timeout via Line 60 in c18c623 |
|
Setting a new default timeout of 5 seconds would be a breaking change. Calling datastore_search on a 1M row table will take longer than that just because of computing the total row count. The default should either be really long or unset to minimize breaking existing users' code. |
As we set the timeout in |
|
We decided to keep the timeout unset by default to not break existing scripts (as it does requests by default). Users relying on a timely response can configure the timeouts explicitly in the API call (using |
Make sure the the
timeoutparameter is passed to requests before making an HTTP request. By default we use (5,5) which means 5 seconds for connect and read timeouts.I added a separate option for the read timeout as it is specially important in the streaming requests we use to load/dump datasets.
@wardi @EricSoroos what do you think of the default value? currently 5 seconds for both