Qilan2 commited on
Commit
11983aa
·
verified ·
1 Parent(s): 56dbc17

Update server10.py

Browse files
Files changed (1) hide show
  1. server10.py +2 -2
server10.py CHANGED
@@ -459,7 +459,7 @@ if os.path.exists(f'/data/{huggingface_Data_name}.zip'):
459
  # 检查是否是中国时区早上6点
460
  china_tz = pytz.timezone('Asia/Shanghai')
461
  now = datetime.now(china_tz)
462
- if now.hour == 6 and now.minute < 3: # 6:00-6:05之间退出
463
  print(f"当前时间: {now.strftime('%Y-%m-%d %H:%M:%S')}, 到达早上6点,退出循环")
464
  break
465
  else:
@@ -520,5 +520,5 @@ def restart_huggingface_space(space_name, space_id, partial_token):
520
  }
521
 
522
  # 使用示例
523
- result = restart_huggingface_space("Qi28s", "14150001", "hf_bHdgZHDe QHDHtoMjyIgpKvICbNbWJcTDTG")
524
  print(result)
 
459
  # 检查是否是中国时区早上6点
460
  china_tz = pytz.timezone('Asia/Shanghai')
461
  now = datetime.now(china_tz)
462
+ if now.hour == 14 and now.minute < 2: # 6:00-6:05之间退出
463
  print(f"当前时间: {now.strftime('%Y-%m-%d %H:%M:%S')}, 到达早上6点,退出循环")
464
  break
465
  else:
 
520
  }
521
 
522
  # 使用示例
523
+ result = restart_huggingface_space("Qi28s", "1542101", "hf_bHdgZHDe QHDHtoMjyIgpKvICbNbWJcTDTG")
524
  print(result)