From 9cdce4509db9bc5d56d2a9e7081ffb7e7132ef7a Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 19 Nov 2024 08:25:12 +0800 Subject: [PATCH] fix siteauth schema --- app/scheduler.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/scheduler.py b/app/scheduler.py index d851a0f0..3d11b923 100644 --- a/app/scheduler.py +++ b/app/scheduler.py @@ -19,10 +19,11 @@ from app.chain.transfer import TransferChain from app.core.config import settings from app.core.event import EventManager from app.core.plugin import PluginManager +from app.db.systemconfig_oper import SystemConfigOper from app.helper.sites import SitesHelper from app.log import logger from app.schemas import Notification, NotificationType -from app.schemas.types import EventType +from app.schemas.types import EventType, SystemConfigKey from app.utils.singleton import Singleton from app.utils.timer import TimerUtils @@ -75,7 +76,11 @@ class Scheduler(metaclass=Singleton): role="system") return logger.info("用户未认证,正在尝试重新认证...") - status, msg = SitesHelper().check_user() + auth_conf = SystemConfigOper().get(SystemConfigKey.UserSiteAuthParams) + if auth_conf: + status, msg = SitesHelper().check_user(**auth_conf) + else: + status, msg = SitesHelper().check_user() if status: self._auth_count = 0 logger.info(f"{msg} 用户认证成功")