mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-09-08 18:47:14 +00:00
Merge fix/box-reconnect-skill-context into dev/4.11.x
This commit is contained in:
@@ -280,7 +280,14 @@ class BoxService:
|
|||||||
skill_mgr = getattr(self.ap, 'skill_mgr', None)
|
skill_mgr = getattr(self.ap, 'skill_mgr', None)
|
||||||
reload_skills = getattr(skill_mgr, 'reload_skills', None)
|
reload_skills = getattr(skill_mgr, 'reload_skills', None)
|
||||||
if callable(reload_skills) and not self._cloud_managed:
|
if callable(reload_skills) and not self._cloud_managed:
|
||||||
await reload_skills()
|
binding = await self.ap.workspace_service.get_execution_binding()
|
||||||
|
await reload_skills(
|
||||||
|
ExecutionContext(
|
||||||
|
instance_uuid=binding.instance_uuid,
|
||||||
|
workspace_uuid=binding.workspace_uuid,
|
||||||
|
placement_generation=binding.placement_generation,
|
||||||
|
)
|
||||||
|
)
|
||||||
self.ap.logger.info('Box runtime reconnected, sandbox features restored.')
|
self.ap.logger.info('Box runtime reconnected, sandbox features restored.')
|
||||||
return
|
return
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
|||||||
@@ -565,7 +565,7 @@ async def test_box_service_reconnect_restores_workspace_and_runs_cleanup(
|
|||||||
connector.reconnect.assert_awaited_once()
|
connector.reconnect.assert_awaited_once()
|
||||||
service._ensure_default_workspace.assert_called_once()
|
service._ensure_default_workspace.assert_called_once()
|
||||||
service._purge_attachment_dirs.assert_awaited_once()
|
service._purge_attachment_dirs.assert_awaited_once()
|
||||||
app.skill_mgr.reload_skills.assert_awaited_once()
|
app.skill_mgr.reload_skills.assert_awaited_once_with(_CONTEXT)
|
||||||
assert service.available is True
|
assert service.available is True
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user