Skip to content

Commit

Permalink
EKIR-209 Add bigger timeout for loans
Browse files Browse the repository at this point in the history
  • Loading branch information
natlibfi-kaisa committed Jul 18, 2024
1 parent a519597 commit 874b6df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Makefile for setting up a virtual enviroment and running the application.

.PHONY: install dependencies install_libxmlsec1
.PHONY: install dependencies install_libxmlsec1

# SECTION 1: Install dependencies

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
```

and source it with:

```shell
Expand Down
4 changes: 3 additions & 1 deletion api/odl.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ def _get(self, url: str, headers: dict[str, str] | None = None) -> Response:
auth_header = "Basic %s" % base64.b64encode(f"{username}:{password}")
headers["Authorization"] = auth_header

return HTTP.get_with_timeout(url, headers=headers)
return HTTP.get_with_timeout(
url, headers=headers, timeout=30
) # Added a bigger timeout for loan checkouts

def _url_for(self, *args: Any, **kwargs: Any) -> str:
"""Wrapper around flask's url_for to be overridden for tests."""
Expand Down

0 comments on commit 874b6df

Please sign in to comment.