Update server3.py
Browse files- server3.py +3 -1
server3.py
CHANGED
|
@@ -391,7 +391,9 @@ def check_api1():
|
|
| 391 |
retry_count = 3 # 设置重试次数
|
| 392 |
for attempt in range(retry_count):
|
| 393 |
try:
|
| 394 |
-
|
|
|
|
|
|
|
| 395 |
")
|
| 396 |
# subprocess.run(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' root@{ssh_url}:{data_folder}/ {data_folder}/",
|
| 397 |
shell=True, check=True, timeout=300)
|
|
|
|
| 391 |
retry_count = 3 # 设置重试次数
|
| 392 |
for attempt in range(retry_count):
|
| 393 |
try:
|
| 394 |
+
subprocess.run(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no -o ConnectTimeout=30' --timeout=300 root@{ssh_url}:{data_folder}/ {data_folder}/",
|
| 395 |
+
shell=True, check=True)
|
| 396 |
+
# os.system(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no -o ConnectTimeout=30' --timeout=300 root@{ssh_url}:{data_folder}/ {data_folder}/
|
| 397 |
")
|
| 398 |
# subprocess.run(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' root@{ssh_url}:{data_folder}/ {data_folder}/",
|
| 399 |
shell=True, check=True, timeout=300)
|