"""cleanup — удалить сессию.""" from .state import _sessions, _lock def cleanup(sid: str): """Удалить сессию и остановить её TTL-таймер.""" with _lock: s = _sessions.pop(sid, None) if s and s.get("timer"): s["timer"].cancel()