timeout chunk improvements
All checks were successful
Build Sphinx Docs Set / Build Docs (pull_request) Successful in 19m57s
Build Project / Build Project (3.10) (pull_request) Successful in 19m59s
Test with tox / Test with tox (3.10) (pull_request) Successful in 19m46s
Build Project / Build Project (3.11) (pull_request) Successful in 20m19s
Build Project / Build Project (3.12) (pull_request) Successful in 20m21s
Test with tox / Test with tox (3.11) (pull_request) Successful in 18m48s
Test with tox / Test with tox (3.12) (pull_request) Successful in 1m25s

This commit is contained in:
ben 2026-04-21 17:11:16 -04:00
parent 53e8e5adb6
commit c9b19949ad
2 changed files with 6 additions and 2 deletions

View File

@ -659,7 +659,9 @@ class NodeAgent:
base_url = f"{self.hub_url}/datasets/upload"
steps = (result.get("steps") if isinstance(result, dict) else getattr(result, "steps", None)) or []
campaign_name: str = getattr(config, "name", None) or ""
output_obj = getattr(config, "output", None)
folder = getattr(output_obj, "folder", None)
campaign_name: str = folder if folder is not None else (getattr(config, "name", None) or "")
for step in steps:
output_path: str | None = getattr(step, "output_path", None)
if not output_path:
@ -754,7 +756,7 @@ class NodeAgent:
headers=headers,
files={"file": (filename, chunk, "application/octet-stream")},
data={**metadata, "upload_id": upload_id, "chunk_index": i, "total_chunks": total_chunks},
timeout=300,
timeout=(30, None), # 30s connect, no read timeout — server may take minutes on final chunk
verify=verify,
)
if not resp.ok:

View File

@ -276,6 +276,7 @@ class OutputConfig:
path: str = "recordings"
device_id: Optional[str] = None # for device-profile campaigns
repo: Optional[str] = None
folder: Optional[str] = None # repo subfolder: None = use campaign name, "" = no subfolder, str = custom
@classmethod
def from_dict(cls, d: dict) -> "OutputConfig":
@ -284,6 +285,7 @@ class OutputConfig:
path=str(d.get("path", "recordings")),
device_id=d.get("device_id"),
repo=d.get("repo"),
folder=d.get("folder"),
)