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} 用户认证成功")