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