mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 12:52:26 +00:00
chore: 完成多批次代码优化与重构
- 重构工作流模块目录结构,迁移代码文件 - 修复类型断言空值安全问题,添加 ! 操作符 - 优化样式类名,替换 flex-cc 为标准 flex 工具类 - 更新路由标签简化文案,移除冗余注释 - 调整 ruff 配置,放宽行长度限制 - 更新 README 与多语言文案,优化项目描述 - 修复表单、图表组件的类型与样式问题 - 简化搜索表单、数据卡片的布局代码
This commit is contained in:
+3
-10
@@ -26,10 +26,7 @@ class CacheService:
|
||||
db_size = await RedisCURD(redis).db_size()
|
||||
command_stats_dict = await RedisCURD(redis).commandstats()
|
||||
|
||||
command_stats = [
|
||||
{"name": key.split("_")[1], "value": str(value.get("calls"))}
|
||||
for key, value in command_stats_dict.items()
|
||||
]
|
||||
command_stats = [{"name": key.split("_")[1], "value": str(value.get("calls"))} for key, value in command_stats_dict.items()]
|
||||
return CacheMonitorSchema(command_stats=command_stats, db_size=db_size, info=info)
|
||||
|
||||
@classmethod
|
||||
@@ -63,16 +60,12 @@ class CacheService:
|
||||
- list: 缓存键名列表信息。
|
||||
"""
|
||||
cache_keys = await RedisCURD(redis).get_keys(f"{cache_name}*")
|
||||
cache_key_list = [
|
||||
key.split(":", 1)[1] for key in cache_keys if key.startswith(f"{cache_name}:")
|
||||
]
|
||||
cache_key_list = [key.split(":", 1)[1] for key in cache_keys if key.startswith(f"{cache_name}:")]
|
||||
|
||||
return cache_key_list
|
||||
|
||||
@classmethod
|
||||
async def get_cache_monitor_cache_value_service(
|
||||
cls, redis: Redis, cache_name: str, cache_key: str
|
||||
) -> CacheInfoSchema:
|
||||
async def get_cache_monitor_cache_value_service(cls, redis: Redis, cache_name: str, cache_key: str) -> CacheInfoSchema:
|
||||
"""
|
||||
获取缓存内容信息。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user