def answer_callback(msg_id: int, answer) -> None: total_answer = { 'id': msg_id, 'ans': answer, } QueueWrapper.send_message(answer_queue_name, dump_object(total_answer))
def write_msg(msg_id, request): message = { 'id': msg_id, 'req': request } packed = dump_object(message) QueueWrapper.send_message(request_queue_name, packed)
def write_msg(msg_id: dict, request: dict): message = {'id': msg_id, 'req': request} packed: bytes = dump_object(message) QueueWrapper.send_message(request_queue_name, packed)
def write_msg(request): packed = dump_object(request) QueueWrapper.send_message(queue_name, packed)
def answer_callback(msg_id, answer): total_answer = { 'id': msg_id, 'ans': answer, } QueueWrapper.send_message(answer_queue_name, dump_object(total_answer))