EnginXLink.py 文件源码

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

项目:Service-Descovery-Stack 作者: Tinhorn 项目源码 文件源码
def watch_services_node(url, file):
    payload = {'recursive': 'true', 'wait': 'true'}
    while True:
        try:
            r = requests.get(url=url, params=payload)
            return_body = r.json()

            # Checking that return dict is empty
            if return_body:
                watch_thread = watchetcdutils.ChangeNginxThread(confloc=file, thread_id=watchthreadid, payload=return_body,
                                                                lock=thread_lock)
                watch_thread.start()
                # confutils = nginxconfutils.NginxConfUtils(confloc=file, thread_id=watchthreadid)
                # confutils.load_conf()

        except requests.Timeout:
            logger.info("Timeout happened")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号