Qilan2 commited on
Commit
0b67b58
·
verified ·
1 Parent(s): dfcd100

Update Card_Hub.py

Browse files
Files changed (1) hide show
  1. Card_Hub.py +3 -3
Card_Hub.py CHANGED
@@ -364,14 +364,14 @@ def check_api1():
364
  break
365
  if nn > 2:
366
  break
367
- url = f"{st_url}/api/auth/login"
368
  try:
369
  response = requests_retry_session().get(url, timeout=30)
370
  response.raise_for_status()
371
  response_json = response.json()
372
  print("%s 接口返回信息: %s", url, response_json) # 修正日志记录
373
- if "token" in response_json:
374
- print("检测到 token")
375
  try:
376
  subprocess.run(f"rsync -avz --timeout=600 -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' root@{ssh_url}:{data_folder}/ {data_folder}/",shell=True, check=True)
377
  # break # 如果成功,跳出重试循环
 
364
  break
365
  if nn > 2:
366
  break
367
+ url = f"{st_url}/api"
368
  try:
369
  response = requests_retry_session().get(url, timeout=30)
370
  response.raise_for_status()
371
  response_json = response.json()
372
  print("%s 接口返回信息: %s", url, response_json) # 修正日志记录
373
+ if "角色卡分享" in response_json:
374
+ print("检测到 角色卡分享")
375
  try:
376
  subprocess.run(f"rsync -avz --timeout=600 -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' root@{ssh_url}:{data_folder}/ {data_folder}/",shell=True, check=True)
377
  # break # 如果成功,跳出重试循环