Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert timeout env var to int #108

Merged
merged 3 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
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
7 changes: 3 additions & 4 deletions log10/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,9 @@ def post_request(url: str, json_payload: dict = {}) -> requests.Response:
headers = {"x-log10-token": token, "Content-Type": "application/json"}
json_payload["organization_id"] = org_id
try:
# todo: set timeout
res = requests.post(
url, headers=headers, json=json_payload, timeout=os.environ.get("LOG10_REQUESTS_TIMEOUT", 10)
)
timeout = int(os.environ.get("LOG10_REQUESTS_TIMEOUT", 10))
assert isinstance(timeout, int)
res = requests.post(url, headers=headers, json=json_payload, timeout=timeout)
# raise_for_status() will raise an exception if the status is 4xx, 5xxx
res.raise_for_status()

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "log10-io"

version = "0.6.3"
version = "0.6.4"
authors = ["log10 team"]
license = "MIT"
description = "Unified LLM data management"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="Log10",
version="0.6.3",
version="0.6.4",
description="Log10 LLM data management",
author="Log10 team",
author_email="team@log10.io",
Expand Down