code quality fixes and cleanup

This commit is contained in:
Riccardo Balbo 2024-09-07 09:09:22 +00:00
commit 2bbbcd4d65
32 changed files with 4943 additions and 1368 deletions

10
execution_queue.py Normal file
View file

@ -0,0 +1,10 @@
import asyncio
from typing import Any, Dict
execution_queue: asyncio.Queue[Dict[str, Any]] = asyncio.Queue()
async def enqueue(action):
future = asyncio.Future()
execution_queue.put_nowait({"action": action, "future": future})
return await future