[fix] race condition

This commit is contained in:
Azamat 2026-04-02 20:56:26 +03:00
parent fb974fff1e
commit f5d13feaf9
7 changed files with 185 additions and 63 deletions

View file

@ -28,6 +28,21 @@ class SandboxSessionRepository(Protocol):
def delete(self, session_id: str) -> None: ...
class LockContext(Protocol):
def __enter__(self) -> None: ...
def __exit__(
self,
exc_type: type[BaseException] | None,
exc: BaseException | None,
traceback: TracebackType | None,
) -> bool | None: ...
class SandboxLifecycleLocker(Protocol):
def lock(self, chat_id: str) -> LockContext: ...
class SandboxRuntime(Protocol):
def create(
self,