remove musl-dev

This commit is contained in:
jxxghp
2025-08-21 12:32:53 +08:00
parent bc242f4fd4
commit d12c1b9ac4
3 changed files with 8 additions and 29 deletions
+6 -24
View File
@@ -1,8 +1,6 @@
import asyncio import asyncio
import pickle
import random import random
import time import time
import traceback
from concurrent.futures import ThreadPoolExecutor, as_completed from concurrent.futures import ThreadPoolExecutor, as_completed
from datetime import datetime from datetime import datetime
from typing import Dict, Tuple from typing import Dict, Tuple
@@ -59,7 +57,7 @@ class SearchChain(ChainBase):
results = self.process(mediainfo=mediainfo, sites=sites, area=area, no_exists=no_exists) results = self.process(mediainfo=mediainfo, sites=sites, area=area, no_exists=no_exists)
# 保存到本地文件 # 保存到本地文件
if cache_local: if cache_local:
self.save_cache(pickle.dumps(results), self.__result_temp_file) self.save_cache(results, self.__result_temp_file)
return results return results
def search_by_title(self, title: str, page: Optional[int] = 0, def search_by_title(self, title: str, page: Optional[int] = 0,
@@ -85,36 +83,20 @@ class SearchChain(ChainBase):
torrent_info=torrent) for torrent in torrents] torrent_info=torrent) for torrent in torrents]
# 保存到本地文件 # 保存到本地文件
if cache_local: if cache_local:
self.save_cache(pickle.dumps(contexts), self.__result_temp_file) self.save_cache(contexts, self.__result_temp_file)
return contexts return contexts
def last_search_results(self) -> List[Context]: def last_search_results(self) -> List[Context]:
""" """
获取上次搜索结果 获取上次搜索结果
""" """
# 读取本地文件缓存 return self.load_cache(self.__result_temp_file)
content = self.load_cache(self.__result_temp_file)
if not content:
return []
try:
return pickle.loads(content)
except Exception as e:
logger.error(f'加载搜索结果失败:{str(e)} - {traceback.format_exc()}')
return []
async def async_last_search_results(self) -> List[Context]: async def async_last_search_results(self) -> List[Context]:
""" """
异步获取上次搜索结果 异步获取上次搜索结果
""" """
# 读取本地文件缓存 return await self.async_load_cache(self.__result_temp_file)
content = await self.async_load_cache(self.__result_temp_file)
if not content:
return []
try:
return pickle.loads(content)
except Exception as e:
logger.error(f'加载搜索结果失败:{str(e)} - {traceback.format_exc()}')
return []
async def async_search_by_id(self, tmdbid: Optional[int] = None, doubanid: Optional[str] = None, async def async_search_by_id(self, tmdbid: Optional[int] = None, doubanid: Optional[str] = None,
mtype: MediaType = None, area: Optional[str] = "title", season: Optional[int] = None, mtype: MediaType = None, area: Optional[str] = "title", season: Optional[int] = None,
@@ -143,7 +125,7 @@ class SearchChain(ChainBase):
results = await self.async_process(mediainfo=mediainfo, sites=sites, area=area, no_exists=no_exists) results = await self.async_process(mediainfo=mediainfo, sites=sites, area=area, no_exists=no_exists)
# 保存到本地文件 # 保存到本地文件
if cache_local: if cache_local:
await self.async_save_cache(pickle.dumps(results), self.__result_temp_file) await self.async_save_cache(results, self.__result_temp_file)
return results return results
async def async_search_by_title(self, title: str, page: Optional[int] = 0, async def async_search_by_title(self, title: str, page: Optional[int] = 0,
@@ -169,7 +151,7 @@ class SearchChain(ChainBase):
torrent_info=torrent) for torrent in torrents] torrent_info=torrent) for torrent in torrents]
# 保存到本地文件 # 保存到本地文件
if cache_local: if cache_local:
await self.async_save_cache(pickle.dumps(contexts), self.__result_temp_file) await self.async_save_cache(contexts, self.__result_temp_file)
return contexts return contexts
@staticmethod @staticmethod
+2 -4
View File
@@ -307,13 +307,11 @@ class AsyncRedisHelper(metaclass=Singleton):
_complex_serializable_types = set() _complex_serializable_types = set()
_simple_serializable_types = set() _simple_serializable_types = set()
def __init__(self, redis_url: Optional[str] = "redis://localhost"): def __init__(self):
""" """
初始化异步Redis助手实例 初始化异步Redis助手实例
:param redis_url: Redis服务的URL
""" """
self.redis_url = redis_url self.redis_url = settings.CACHE_BACKEND_URL
self.client: Optional[Redis] = None self.client: Optional[Redis] = None
async def _connect(self): async def _connect(self):
-1
View File
@@ -83,7 +83,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
rsync \ rsync \
ffmpeg \ ffmpeg \
nano \ nano \
musl-dev \
&& dpkg-reconfigure --frontend noninteractive tzdata \ && dpkg-reconfigure --frontend noninteractive tzdata \
&& \ && \
if [ "$(uname -m)" = "x86_64" ]; \ if [ "$(uname -m)" = "x86_64" ]; \