preview: increase timeout to 10s, add priority queue scheduling (images > video > pdf > office)

This commit is contained in:
Leo Vasanko
2026-04-27 04:51:41 +00:00
parent 4a66d2749c
commit cb954db537
2 changed files with 115 additions and 43 deletions
+2
View File
@@ -145,6 +145,8 @@ def convert_to_png(file_path: Path, timeout: float = 30.0) -> bytes:
headers = {"Content-Type": "application/json"}
token = _build_jwt_token(payload)
if token:
# Conversion API expects JWT in request body when token checks are enabled.
payload["token"] = token
headers["Authorization"] = token
req = urllib.request.Request( # noqa: S310