From 92fe0c19997cfdc5b2a0e902f2d8ea268a15b385 Mon Sep 17 00:00:00 2001 From: emmatveev Date: Sun, 8 Dec 2024 11:34:08 +0300 Subject: [PATCH] fix --- utils/queues.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/queues.py b/utils/queues.py index bbae082..43ead5e 100644 --- a/utils/queues.py +++ b/utils/queues.py @@ -2,6 +2,8 @@ import time import tasks_pb2_grpc import tasks_pb2 +from google.protobuf import json_format + class QueuesException(Exception): ... @@ -16,7 +18,7 @@ class TasksHandlerMixin: time.sleep(0.2) continue try: - self.process(task.payload) + self.process(json_format.MessageToDict(task.payload)) except Exception as exc: print(f'Error processing message id={task["id"]}, payload={task["payload"]}, exc={exc}') continue