MCPcopy
hub / github.com/usestrix/strix / delete

Method delete

strix/runtime/docker_client.py:128–133  ·  view source on GitHub ↗
(self, session: SandboxSession)

Source from the content-addressed store, hash-verified

126 return container
127
128 async def delete(self, session: SandboxSession) -> SandboxSession:
129 container_id = getattr(getattr(session._inner, "state", None), "container_id", None)
130 if container_id:
131 with contextlib.suppress(docker_errors.NotFound, docker_errors.APIError):
132 self.docker_client.containers.get(container_id).kill()
133 return await super().delete(session)

Callers 2

scope_deleteFunction · 0.80
cleanupFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected