driver.py 文件源码

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

项目:volttron-applications 作者: VOLTTRON 项目源码 文件源码
def _publish_wrapper(self, topic, headers, message):
        while True:
            try:
                with publish_lock():
                    self.vip.pubsub.publish('pubsub', topic, headers=headers, message=message).get(timeout=10.0)
            except gevent.Timeout:
                _log.warn("Did not receive confirmation of publish to "+topic)
                break
            except Again:
                _log.warn("publish delayed: " + topic + " pubsub is busy")
                gevent.sleep(random.random())
            except VIPError as ex:
                _log.warn("driver failed to publish " + topic + ": " + str(ex))
                break
            else:
                break
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号