Qi28 commited on
Commit
a310470
·
verified ·
1 Parent(s): 4ad8453

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +3 -3
server.py CHANGED
@@ -45,6 +45,7 @@ nezha_agent_url = 'nzzz.nwb.lol:5555'
45
  # print("venv存在")
46
 
47
  def Frpc():
 
48
  os.system('rm /tmp/code/frp/*.ini')
49
  # 定义 Hugging Face 数据集 ID
50
  api_url = f'https://hf-mirror.com/api/datasets/{huggiingface_repo_id}/tree/main/{huggiingface_path}'
@@ -80,6 +81,7 @@ def Frpc():
80
 
81
 
82
  def NPS():
 
83
  os.system("/tmp/code/nps/npc -server={NPS_server} -vkey={NPS_key} -type=tcp")
84
 
85
  def run_commands():
@@ -190,10 +192,8 @@ def check_api1():
190
  except requests.exceptions.ConnectionError as e:
191
  print(f"接口异常1: {e}")
192
  if frp_status:
193
- print("启动FRP")
194
  threading.Thread(target=Frpc, daemon=True).start()
195
  if nps_status:
196
- print("启动NPS")
197
  threading.Thread(target=NPS, daemon=True).start()
198
  # threading.Thread(target=run_script).start()
199
  #threading.Thread(target=run_commands).start()
@@ -229,7 +229,7 @@ def comfyui():
229
  clear_output()
230
 
231
  threading.Thread(target=run_commands).start()
232
- threading.Thread(target=comfyui, daemon=True).start()
233
  os.system('rm /tmp/code/sd/stable-diffusion-webui/config.json /tmp/code/sd/stable-diffusion-webui/ui-config.json /tmp/code/*.log')
234
  os.system("wget -O /tmp/code/sd/stable-diffusion-webui/config.json 'https://hf-mirror.com/datasets/Qi28/SD_QZ/resolve/main/comfig/sd_config.json'")
235
  os.system("wget -O /tmp/code/sd/stable-diffusion-webui/ui-config.json 'https://hf-mirror.com/datasets/Qi28/SD_QZ/resolve/main/comfig/sd_ui-config.json'")
 
45
  # print("venv存在")
46
 
47
  def Frpc():
48
+ print("启动FRP")
49
  os.system('rm /tmp/code/frp/*.ini')
50
  # 定义 Hugging Face 数据集 ID
51
  api_url = f'https://hf-mirror.com/api/datasets/{huggiingface_repo_id}/tree/main/{huggiingface_path}'
 
81
 
82
 
83
  def NPS():
84
+ print("启动NPS")
85
  os.system("/tmp/code/nps/npc -server={NPS_server} -vkey={NPS_key} -type=tcp")
86
 
87
  def run_commands():
 
192
  except requests.exceptions.ConnectionError as e:
193
  print(f"接口异常1: {e}")
194
  if frp_status:
 
195
  threading.Thread(target=Frpc, daemon=True).start()
196
  if nps_status:
 
197
  threading.Thread(target=NPS, daemon=True).start()
198
  # threading.Thread(target=run_script).start()
199
  #threading.Thread(target=run_commands).start()
 
229
  clear_output()
230
 
231
  threading.Thread(target=run_commands).start()
232
+ # threading.Thread(target=comfyui, daemon=True).start()
233
  os.system('rm /tmp/code/sd/stable-diffusion-webui/config.json /tmp/code/sd/stable-diffusion-webui/ui-config.json /tmp/code/*.log')
234
  os.system("wget -O /tmp/code/sd/stable-diffusion-webui/config.json 'https://hf-mirror.com/datasets/Qi28/SD_QZ/resolve/main/comfig/sd_config.json'")
235
  os.system("wget -O /tmp/code/sd/stable-diffusion-webui/ui-config.json 'https://hf-mirror.com/datasets/Qi28/SD_QZ/resolve/main/comfig/sd_ui-config.json'")