def send_task(self):
while True:
if self.send_queue.empty()&self.handle_stoping:
self.send_stop_evt.set()
return
if not self.send_queue.empty():
callinfo=self.send_queue.get_nowait()
# ??RPC?????RPC????`rpc_queue`????????`reply_to`?`correlation_id`
self._channel.basic_publish(exchange=self.Exchange,
routing_key=self.Queue,
properties=pika.BasicProperties(
reply_to = self.callback_queue,
),
body=callinfo.body)
gevent.sleep(0)
评论列表
文章目录