fix(terminal): enhance error logging in cleanup functions with exception info
This commit is contained in:
parent
43f2321225
commit
5007a122b2
1 changed files with 2 additions and 2 deletions
|
|
@ -595,7 +595,7 @@ def _cleanup_thread_worker():
|
||||||
config = _get_env_config()
|
config = _get_env_config()
|
||||||
_cleanup_inactive_envs(config["lifetime_seconds"])
|
_cleanup_inactive_envs(config["lifetime_seconds"])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning("Error in cleanup thread: %s", e)
|
logger.warning("Error in cleanup thread: %s", e, exc_info=True)
|
||||||
|
|
||||||
for _ in range(60):
|
for _ in range(60):
|
||||||
if not _cleanup_running:
|
if not _cleanup_running:
|
||||||
|
|
@ -663,7 +663,7 @@ def cleanup_all_environments():
|
||||||
cleanup_vm(task_id)
|
cleanup_vm(task_id)
|
||||||
cleaned += 1
|
cleaned += 1
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("Error cleaning %s: %s", task_id, e)
|
logger.error("Error cleaning %s: %s", task_id, e, exc_info=True)
|
||||||
|
|
||||||
# Also clean any orphaned directories
|
# Also clean any orphaned directories
|
||||||
scratch_dir = _get_scratch_dir()
|
scratch_dir = _get_scratch_dir()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue