master.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:rebus 作者: airbus-seclab 项目源码 文件源码
def _send_signal(self, signal_name, args):
        # Send a signal on the exchange
        body = {'signal_name': signal_name, 'args': args}
        body = serializer.dumps(body)
        b = False
        while not b:
            try:
                self.channel.basic_publish(
                    exchange='rebus_signals', routing_key='', body=body,
                    properties=pika.BasicProperties(delivery_mode=2,))
                b = True
            except pika.exceptions.ConnectionClosed:
                log.info("Disconnected (in _send_signal). "
                         "Trying to reconnect...")
                self._reconnect()
                time.sleep(0.5)

    # TODO Check is the key is valid
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号