From 1012a878e50740b53d1a2e8b0d30440cb7b6240c Mon Sep 17 00:00:00 2001 From: zhangtao2020 <18066722603@163.com> Date: Wed, 29 Dec 2021 12:05:56 +0800 Subject: [PATCH] refresh worker info before query idle instance --- main/monitor/workerstatus.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/monitor/workerstatus.py b/main/monitor/workerstatus.py index 83d7d4d..435df83 100644 --- a/main/monitor/workerstatus.py +++ b/main/monitor/workerstatus.py @@ -301,6 +301,9 @@ class QueryOBSWorker(object): instance_list : aarch64 or x86 instance list """ instance_list = {"aarch64":{"l1":0, "l2":0, "l3":0}, "x86":{"l1":0, "l2":0, "l3":0}} + result = self.generate_all_worker_info_file() + if not result: + return instance_list idle_list = self.query_idle_worker_ip(iplist) self._convert_instance_list(idle_list, "aarch64", instance_list) self._convert_instance_list(idle_list, "x86", instance_list) -- Gitee