Merge pull request 'fix' (#30) from master into dev

Reviewed-on: #30
This commit is contained in:
emmatveev 2024-12-08 11:34:33 +03:00
commit f0399196b5

View File

@ -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