This commit is contained in:
emmatveev 2024-12-13 02:08:36 +03:00
parent 699eafd0df
commit f036f521d8

View File

@ -15,8 +15,7 @@ class TasksHandlerMixin:
response: tasks_pb2.TakeResponse = self.stub.Take(tasks_pb2.TakeRequest(queue=self.queue_name))
task = response.task
if not task:
if response.retry_after:
time.sleep(response.retry_after)
time.sleep(0.2)
continue
try:
payload = json_format.MessageToDict(task.payload)