fix logger

This commit is contained in:
jxxghp
2024-02-09 09:35:05 +08:00
parent e4c0643c39
commit d0184bd34c
16 changed files with 54 additions and 33 deletions

View File

@ -1,6 +1,7 @@
import pickle
import random
import time
import traceback
from pathlib import Path
from threading import RLock
from typing import Optional
@ -8,6 +9,7 @@ from typing import Optional
from app.core.config import settings
from app.core.meta import MetaBase
from app.core.metainfo import MetaInfo
from app.log import logger
from app.utils.singleton import Singleton
from app.schemas.types import MediaType
@ -119,7 +121,7 @@ class DoubanCache(metaclass=Singleton):
return data
return {}
except Exception as e:
print(str(e))
logger.error(f"加载缓存失败: {str(e)} - {traceback.format_exc()}")
return {}
def update(self, meta: MetaBase, info: dict) -> None: