mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-30 01:41:43 +00:00
Merge PR #231: fix: use task-specific glob pattern in disk usage calculation
Authored by Farukest. Fixes #230.
This commit is contained in:
commit
6d2481ee5c
2 changed files with 63 additions and 1 deletions
|
|
@ -645,7 +645,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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue