Skip to content

Commit

Permalink
Add timeout to requests calls (#458)
Browse files Browse the repository at this point in the history
* Add timeout to `requests` calls

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* trailing comma

* fix test

---------

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Taylor Jackle Spriggs <taylor.spriggs@intel.com>
3 people authored May 31, 2024
1 parent 1f3974c commit 57803e0
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions sigopt/run_context.py
Original file line number Diff line number Diff line change
@@ -459,6 +459,7 @@ def _log_image(self, name, payload):
upload_info["url"],
headers=upload_info["headers"],
data=image_data,
timeout=60,
)
response.raise_for_status()

1 change: 1 addition & 0 deletions test/runs/test_context.py
Original file line number Diff line number Diff line change
@@ -243,4 +243,5 @@ def test_log_image(self, run_context):
"https://test.sigopt.ninja/upload_file",
headers={"X-Testing": "value"},
data=image_data,
timeout=mock.ANY,
)

0 comments on commit 57803e0

Please sign in to comment.