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")
评论列表
文章目录