zfp-oss #27
|
|
@ -68,7 +68,7 @@ _HEARTBEAT_INTERVAL = 30 # seconds between heartbeats
|
|||
_POLL_TIMEOUT = 30 # server-side long-poll duration
|
||||
_POLL_CLIENT_TIMEOUT = 40 # client read timeout — slightly longer than server
|
||||
_RECONNECT_PAUSE = 5 # seconds to wait after a poll error before retrying
|
||||
_CHUNK_SIZE = 50 * 1024 * 1024 # 50 MB — well below Cloudflare's 100 MB limit
|
||||
_CHUNK_SIZE = 10 * 1024 * 1024 # 10 MB per chunk — fast enough for git-LFS to process within timeout
|
||||
_DIRECT_THRESHOLD = 90 * 1024 * 1024 # files above this use chunked upload
|
||||
_CAPTURE_SAMPLES = 4096 # IQ samples per inference window
|
||||
_IDLE_LABELS = frozenset({"noise", "idle", "no_signal", "unknown_protocol", "background"})
|
||||
|
|
@ -659,13 +659,16 @@ 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 ""
|
||||
for step in steps:
|
||||
output_path: str | None = getattr(step, "output_path", None)
|
||||
if not output_path:
|
||||
continue
|
||||
device_id: str = getattr(step, "transmitter_id", "") or ""
|
||||
for fpath in _sigmf_files(output_path):
|
||||
filename = os.path.basename(fpath)
|
||||
basename = os.path.basename(fpath)
|
||||
path_parts = [p for p in (campaign_name, device_id) if p]
|
||||
filename = "/".join(path_parts + [basename])
|
||||
metadata = {
|
||||
"filename": filename,
|
||||
"repo_owner": repo_owner,
|
||||
|
|
@ -751,7 +754,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=120,
|
||||
timeout=300,
|
||||
verify=verify,
|
||||
)
|
||||
if not resp.ok:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user