zfp-oss #27
|
|
@ -659,7 +659,9 @@ class NodeAgent:
|
||||||
base_url = f"{self.hub_url}/datasets/upload"
|
base_url = f"{self.hub_url}/datasets/upload"
|
||||||
steps = (result.get("steps") if isinstance(result, dict) else getattr(result, "steps", None)) or []
|
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:
|
for step in steps:
|
||||||
output_path: str | None = getattr(step, "output_path", None)
|
output_path: str | None = getattr(step, "output_path", None)
|
||||||
if not output_path:
|
if not output_path:
|
||||||
|
|
@ -754,7 +756,7 @@ class NodeAgent:
|
||||||
headers=headers,
|
headers=headers,
|
||||||
files={"file": (filename, chunk, "application/octet-stream")},
|
files={"file": (filename, chunk, "application/octet-stream")},
|
||||||
data={**metadata, "upload_id": upload_id, "chunk_index": i, "total_chunks": total_chunks},
|
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,
|
verify=verify,
|
||||||
)
|
)
|
||||||
if not resp.ok:
|
if not resp.ok:
|
||||||
|
|
|
||||||
|
|
@ -276,6 +276,7 @@ class OutputConfig:
|
||||||
path: str = "recordings"
|
path: str = "recordings"
|
||||||
device_id: Optional[str] = None # for device-profile campaigns
|
device_id: Optional[str] = None # for device-profile campaigns
|
||||||
repo: Optional[str] = None
|
repo: Optional[str] = None
|
||||||
|
folder: Optional[str] = None # repo subfolder: None = use campaign name, "" = no subfolder, str = custom
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls, d: dict) -> "OutputConfig":
|
def from_dict(cls, d: dict) -> "OutputConfig":
|
||||||
|
|
@ -284,6 +285,7 @@ class OutputConfig:
|
||||||
path=str(d.get("path", "recordings")),
|
path=str(d.get("path", "recordings")),
|
||||||
device_id=d.get("device_id"),
|
device_id=d.get("device_id"),
|
||||||
repo=d.get("repo"),
|
repo=d.get("repo"),
|
||||||
|
folder=d.get("folder"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user