mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-09 12:40:59 +00:00
fix(runtime): complete reconnect recovery paths
This commit is contained in:
@@ -189,6 +189,9 @@ class BoxRuntimeConnector(ManagedRuntimeConnector):
|
||||
await self._close_managed_subprocess()
|
||||
raise
|
||||
|
||||
if self._heartbeat_task is None or self._heartbeat_task.done():
|
||||
self._heartbeat_task = asyncio.create_task(self._heartbeat_loop())
|
||||
|
||||
# -- heartbeat -----------------------------------------------------------
|
||||
|
||||
async def _heartbeat_loop(self) -> None:
|
||||
|
||||
@@ -143,8 +143,14 @@ class BoxService:
|
||||
await asyncio.sleep(delay)
|
||||
try:
|
||||
await connector.reconnect()
|
||||
self._ensure_default_workspace()
|
||||
await self._purge_attachment_dirs()
|
||||
self._available = True
|
||||
self._connector_error = ''
|
||||
skill_mgr = getattr(self.ap, 'skill_mgr', None)
|
||||
reload_skills = getattr(skill_mgr, 'reload_skills', None)
|
||||
if callable(reload_skills):
|
||||
await reload_skills()
|
||||
self.ap.logger.info('Box runtime reconnected, sandbox features restored.')
|
||||
return
|
||||
except Exception as exc:
|
||||
|
||||
Reference in New Issue
Block a user