fix(tools): use task-specific glob pattern in disk usage calculation

This commit is contained in:
Farukest
2026-03-01 03:17:50 +03:00
parent 7b23dbfe68
commit f7300a858e
2 changed files with 63 additions and 1 deletions

View File

@@ -643,7 +643,7 @@ def get_active_environments_info() -> Dict[str, Any]:
scratch_dir = _get_scratch_dir()
for pattern in [f"hermes-*{task_id[:8]}*"]:
import glob
for path in glob.glob(str(scratch_dir / "hermes-*")):
for path in glob.glob(str(scratch_dir / pattern)):
try:
size = sum(f.stat().st_size for f in Path(path).rglob('*') if f.is_file())
total_size += size