降低IPMI会话失败时的控制器压力

This commit is contained in:
2026-05-06 09:05:53 +08:00
parent 51a93a0f76
commit ee7d1bdb8e
3 changed files with 18 additions and 19 deletions
+4 -2
View File
@@ -19,12 +19,14 @@ if __name__ == '__main__':
if not password:
raise RuntimeError('未设置 PASSWORD 环境变量')
client = FanController(host=host, username=username, password=password)
while True:
try:
client = FanController(host=host, username=username, password=password)
client.run()
time.sleep(60)
except Exception as err:
logger.error(
f'运行控制器失败 {err}. {traceback.format_exc()}'
)
)
time.sleep(60)