mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(tools): use task-specific glob pattern in disk usage calculation
This commit is contained in:
parent
7b23dbfe68
commit
f7300a858e
2 changed files with 63 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue