Compare commits

..

No commits in common. "723a230ced0df5da025955a0e02b6bec513bb0dc" and "c32bfad43185f8f7b71b6cd9a2c34afd42823195" have entirely different histories.

2 changed files with 2 additions and 3 deletions

View File

@ -9,7 +9,7 @@ from utils import queues
class Daemon(base.Daemon):
def __init__(self):
super().__init__()
super().__init__(self)
self.telegram_bots: dict[str, dict[str, telebot.TeleBot|None]] = {}
self.threads: dict[str, dict[str, threading.Thread|None]] = {}

View File

@ -13,8 +13,7 @@ class TasksHandlerMixin:
def poll(self):
while True:
response: tasks_pb2.TakeResponse = self.stub.Take(tasks_pb2.TakeRequest(queue=self.queue_name))
task = response.task
if not task:
if not response.task:
time.sleep(0.2)
continue
try: