MCPcopy
hub / github.com/TencentARC/Pixal3D / _write_progress_file

Function _write_progress_file

app.py:302–311  ·  view source on GitHub ↗

Atomically write progress JSON to a file (cross-process safe).

(session_id: str, data: dict)

Source from the content-addressed store, hash-verified

300 _write_progress_file(session_id, {"done": True})
301
302def _write_progress_file(session_id: str, data: dict):
303 """Atomically write progress JSON to a file (cross-process safe)."""
304 path = _progress_file(session_id)
305 tmp_path = path + ".tmp"
306 try:
307 with open(tmp_path, 'w') as f:
308 json.dump(data, f)
309 os.replace(tmp_path, path) # atomic on POSIX
310 except Exception:
311 pass
312
313# Monkey-patch tqdm to intercept progress
314import tqdm as _tqdm_module

Callers 3

_reset_progressFunction · 0.85
_update_progressFunction · 0.85
_finish_progressFunction · 0.85

Calls 2

_progress_fileFunction · 0.85
replaceMethod · 0.45

Tested by

no test coverage detected