Update server2.py
Browse files- server2.py +3 -3
server2.py
CHANGED
|
@@ -448,7 +448,7 @@ def check_api1():
|
|
| 448 |
try:
|
| 449 |
# rsync -avz --port=7073 ljj@8.137.94.137::qilan /a/
|
| 450 |
# subprocess.run(f"rsync -avz --port=7075 ljj@{frp_url}::qilan {data_folder}/", shell=True, check=True)
|
| 451 |
-
subprocess.run(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' root@{ssh_url}:{data_folder}/ {data_folder}/", shell=True, check=True, timeout=
|
| 452 |
except subprocess.CalledProcessError as e:
|
| 453 |
print(f"Rsync 失败,返回码: {e.returncode}")
|
| 454 |
print(f"Command output: {e.output}")
|
|
@@ -459,7 +459,7 @@ def check_api1():
|
|
| 459 |
except requests.exceptions.ConnectionError as e:
|
| 460 |
print(f"接口异常1",n,nn)
|
| 461 |
nn = nn + 1
|
| 462 |
-
if nn >
|
| 463 |
break
|
| 464 |
# threading.Thread(target=Frpc, daemon=True).start()
|
| 465 |
|
|
@@ -645,7 +645,7 @@ def SillyTavern():
|
|
| 645 |
generate_ssh_key()
|
| 646 |
copy_public_key_to_remote(ssh_url, ssh_port, "root", "qilan")
|
| 647 |
# subprocess.run(f"rsync -avz --port=7075 ljj@{frp_url}::qilan {data_folder}/", shell=True, check=True)
|
| 648 |
-
subprocess.run(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' root@{ssh_url}:{data_folder}/ {data_folder}/", shell=True, check=True, timeout=
|
| 649 |
# sys.exit()
|
| 650 |
else:
|
| 651 |
|
|
|
|
| 448 |
try:
|
| 449 |
# rsync -avz --port=7073 ljj@8.137.94.137::qilan /a/
|
| 450 |
# subprocess.run(f"rsync -avz --port=7075 ljj@{frp_url}::qilan {data_folder}/", shell=True, check=True)
|
| 451 |
+
subprocess.run(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' root@{ssh_url}:{data_folder}/ {data_folder}/", shell=True, check=True, timeout=600)
|
| 452 |
except subprocess.CalledProcessError as e:
|
| 453 |
print(f"Rsync 失败,返回码: {e.returncode}")
|
| 454 |
print(f"Command output: {e.output}")
|
|
|
|
| 459 |
except requests.exceptions.ConnectionError as e:
|
| 460 |
print(f"接口异常1",n,nn)
|
| 461 |
nn = nn + 1
|
| 462 |
+
if nn > 10:
|
| 463 |
break
|
| 464 |
# threading.Thread(target=Frpc, daemon=True).start()
|
| 465 |
|
|
|
|
| 645 |
generate_ssh_key()
|
| 646 |
copy_public_key_to_remote(ssh_url, ssh_port, "root", "qilan")
|
| 647 |
# subprocess.run(f"rsync -avz --port=7075 ljj@{frp_url}::qilan {data_folder}/", shell=True, check=True)
|
| 648 |
+
subprocess.run(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' root@{ssh_url}:{data_folder}/ {data_folder}/", shell=True, check=True, timeout=600)
|
| 649 |
# sys.exit()
|
| 650 |
else:
|
| 651 |
|