From 44890aced6683bf99ed0a54335884bc8c376fe56 Mon Sep 17 00:00:00 2001 From: Maximilian Giller Date: Tue, 30 Jan 2024 20:04:01 +0100 Subject: [PATCH] Hmm --- src/handler/action_queue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()