Update server.py
Browse files
server.py
CHANGED
|
@@ -193,7 +193,7 @@ def check_api1():
|
|
| 193 |
response_json = response.json()
|
| 194 |
if response_json.get("detail") in ("Method Not Allowed", "Not Found"):
|
| 195 |
print("SD已经启动")
|
| 196 |
-
|
| 197 |
break # 接口正常,退出循环
|
| 198 |
else:
|
| 199 |
print("SD未启动" )
|
|
@@ -223,6 +223,7 @@ def check_api1():
|
|
| 223 |
if nps_status:
|
| 224 |
threading.Thread(target=NPS, daemon=True).start()
|
| 225 |
threading.Thread(target=run_nezha).start()
|
|
|
|
| 226 |
#threading.Thread(target=run_commands).start()
|
| 227 |
break
|
| 228 |
except requests.exceptions.Timeout as e:
|
|
@@ -232,6 +233,7 @@ def check_api1():
|
|
| 232 |
if nps_status:
|
| 233 |
threading.Thread(target=NPS, daemon=True).start()
|
| 234 |
threading.Thread(target=run_nezha).start()
|
|
|
|
| 235 |
#threading.Thread(target=run_commands).start()
|
| 236 |
break
|
| 237 |
|
|
@@ -242,6 +244,7 @@ def check_api1():
|
|
| 242 |
if nps_status:
|
| 243 |
threading.Thread(target=NPS, daemon=True).start()
|
| 244 |
threading.Thread(target=run_nezha).start()
|
|
|
|
| 245 |
#threading.Thread(target=run_commands).start()
|
| 246 |
break
|
| 247 |
time.sleep(5)
|
|
|
|
| 193 |
response_json = response.json()
|
| 194 |
if response_json.get("detail") in ("Method Not Allowed", "Not Found"):
|
| 195 |
print("SD已经启动")
|
| 196 |
+
|
| 197 |
break # 接口正常,退出循环
|
| 198 |
else:
|
| 199 |
print("SD未启动" )
|
|
|
|
| 223 |
if nps_status:
|
| 224 |
threading.Thread(target=NPS, daemon=True).start()
|
| 225 |
threading.Thread(target=run_nezha).start()
|
| 226 |
+
threading.Thread(target=run_TTS, daemon=True).start()
|
| 227 |
#threading.Thread(target=run_commands).start()
|
| 228 |
break
|
| 229 |
except requests.exceptions.Timeout as e:
|
|
|
|
| 233 |
if nps_status:
|
| 234 |
threading.Thread(target=NPS, daemon=True).start()
|
| 235 |
threading.Thread(target=run_nezha).start()
|
| 236 |
+
threading.Thread(target=run_TTS, daemon=True).start()
|
| 237 |
#threading.Thread(target=run_commands).start()
|
| 238 |
break
|
| 239 |
|
|
|
|
| 244 |
if nps_status:
|
| 245 |
threading.Thread(target=NPS, daemon=True).start()
|
| 246 |
threading.Thread(target=run_nezha).start()
|
| 247 |
+
threading.Thread(target=run_TTS, daemon=True).start()
|
| 248 |
#threading.Thread(target=run_commands).start()
|
| 249 |
break
|
| 250 |
time.sleep(5)
|