Implement reusable upload platform
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
"""Удаление сессии."""
|
||||
|
||||
from .state import _lock, _sessions
|
||||
|
||||
|
||||
def cleanup(sid: str):
|
||||
"""Удалить сессию и остановить её TTL-таймер."""
|
||||
|
||||
with _lock:
|
||||
session = _sessions.pop(sid, None)
|
||||
if session and session.get("timer"):
|
||||
session["timer"].cancel()
|
||||
Reference in New Issue
Block a user