feat(*): make message processing sequential
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import asyncio
|
||||
|
||||
_locks: dict[str, asyncio.Lock] = {}
|
||||
|
||||
|
||||
def get_user_lock(convex_user_id: str) -> asyncio.Lock:
|
||||
lock = _locks.get(convex_user_id)
|
||||
if lock is None:
|
||||
lock = asyncio.Lock()
|
||||
_locks[convex_user_id] = lock
|
||||
return lock
|
||||
Reference in New Issue
Block a user