mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
* fix(terminal): log disk warning check failures at debug level * fix(terminal): guard _check_disk_usage_warning by moving scratch_dir into try --------- Co-authored-by: aydnOktay <xaydinoktay@gmail.com>
This commit is contained in:
parent
1d28b4699b
commit
0ea7d0ec80
2 changed files with 13 additions and 3 deletions
|
|
@ -75,9 +75,9 @@ DISK_USAGE_WARNING_THRESHOLD_GB = float(os.getenv("TERMINAL_DISK_WARNING_GB", "5
|
|||
|
||||
def _check_disk_usage_warning():
|
||||
"""Check if total disk usage exceeds warning threshold."""
|
||||
scratch_dir = _get_scratch_dir()
|
||||
|
||||
try:
|
||||
scratch_dir = _get_scratch_dir()
|
||||
|
||||
# Get total size of hermes directories
|
||||
total_bytes = 0
|
||||
import glob
|
||||
|
|
@ -98,6 +98,7 @@ def _check_disk_usage_warning():
|
|||
|
||||
return False
|
||||
except Exception as e:
|
||||
logger.debug("Disk usage warning check failed: %s", e, exc_info=True)
|
||||
return False
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue