diff --git a/src/handler/action_queue.py b/src/handler/action_queue.py index dda4307..3214c5d 100644 --- a/src/handler/action_queue.py +++ b/src/handler/action_queue.py @@ -5,14 +5,14 @@ from typing import Optional class ActionQueue: def __init__(self) -> None: self.queued_actions: asyncio.Queue = asyncio.Queue() - self.idle_action: Optional[any] = None + self.idle_action: tuple = (None,[],{}) self.queue_task = asyncio.create_task(self.run_queue()) self.idle_action_task = None async def run_queue(self): # try: while True: - if self.queued_actions.empty() and self.idle_action is not None: + if self.queued_actions.empty() and self.idle_action[0] is not None: self.idle_action_task = asyncio.create_task(self.idle_action[0](*(self.idle_action[1]), **(self.idle_action[2]))) action = await self.queued_actions.get()