mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
feat: Provider 签到任务时间可配置
- 前端添加签到时间选择器(HH:MM 格式) - 后端支持动态更新调度器执行时间 - 新增 reschedule_cron_job 方法支持运行时重调度
This commit is contained in:
@@ -614,6 +614,16 @@ class AdminSetSystemConfigAdapter(AdminApiAdapter):
|
||||
payload.get("description"),
|
||||
)
|
||||
|
||||
# 如果更新的是签到任务时间,动态更新调度器
|
||||
if self.key == "provider_checkin_time" and value:
|
||||
try:
|
||||
from src.services.system.maintenance_scheduler import get_maintenance_scheduler
|
||||
|
||||
scheduler = get_maintenance_scheduler()
|
||||
scheduler.update_checkin_time(value)
|
||||
except Exception as e:
|
||||
logger.warning(f"更新签到任务时间失败: {e}")
|
||||
|
||||
# 返回时不暴露加密后的值
|
||||
display_value = "********" if self.key in self.ENCRYPTED_KEYS else config.value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user