fix: Catch LiveException when load new user who room id is 0 in MySQLDataSource

This commit is contained in:
LWR
2023-07-24 22:28:53 +08:00
parent 0d1fb946c5
commit d066e86f9e

View File

@@ -11,7 +11,7 @@ from pydantic import ValidationError
from .model import LiveOn, LiveOff, LiveReport, DynamicUpdate, PushTarget, PushType
from .room import Up
from .sender import Bot
from ..exception.DataSourceException import DataSourceException
from ..exception import LiveException, DataSourceException
from ..utils import config
@@ -480,4 +480,7 @@ class MySQLDataSource(DataSource):
super().format_data()
logger.success(f"已成功载入 UID: {uid} 的推送配置")
try:
await up.connect()
except LiveException as ex:
logger.error(ex.msg)