Skip to content

Commit

Permalink
Add timeout to scarf telemetry requests (#3792)
Browse files Browse the repository at this point in the history
Resolves #3791 by setting a default timeout of 10 seconds.
  • Loading branch information
Rojuinex authored Feb 2, 2025
1 parent 9d58b34 commit 451ad97
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
10 changes: 1 addition & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
## 0.16.19-dev1
## 0.16.19-dev2

### Enhancements

### Features

### Fixes
- **fix a bug where table extraction is skipped when it shouldn't**. Pages with just one table as its content or starts with a table misses table extraction. The routing logic is now fixed.

## 0.16.18-dev1

### Enhancements

### Features

### Fixes
- **Correct deprecated `ruff` invocation in `make tidy`**. This will future-proof it or avoid surprises if someone happens to upgrade Ruff.
- **Remove upper bound constraint on python version** in setup.py. Python3.13 is not yet officially supported, but allow users to try.

Expand Down
2 changes: 1 addition & 1 deletion unstructured/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.16.19-dev1" # pragma: no cover
__version__ = "0.16.19-dev2" # pragma: no cover
4 changes: 4 additions & 0 deletions unstructured/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ def scarf_analytics():
+ "&gpu="
+ str(gpu_present)
+ "&dev=true",
timeout=10,
)
requests.get(
"https://packages2.unstructured.io/python-telemetry?version="
Expand All @@ -305,6 +306,7 @@ def scarf_analytics():
+ "&gpu="
+ str(gpu_present)
+ "&dev=true",
timeout=10,
)
else:
requests.get(
Expand All @@ -319,6 +321,7 @@ def scarf_analytics():
+ "&gpu="
+ str(gpu_present)
+ "&dev=false",
timeout=10,
)
requests.get(
"https://packages2.unstructured.io/python-telemetry?version="
Expand All @@ -332,6 +335,7 @@ def scarf_analytics():
+ "&gpu="
+ str(gpu_present)
+ "&dev=false",
timeout=10,
)
except Exception:
pass
Expand Down

0 comments on commit 451ad97

Please sign in to comment.