mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-20 20:39:55 +00:00
取消aioredis包的使用,改用redis,解决不兼容python3.10以上版本的问题
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
from fastapi.responses import JSONResponse
|
||||
from aioredis import Redis
|
||||
from redis.asyncio.client import Redis
|
||||
|
||||
from app.core.dependencies import AuthPermission, redis_getter
|
||||
from app.api.v1.services.monitor.cache_service import CacheService
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
from typing import Optional
|
||||
from fastapi import APIRouter, Body, Depends
|
||||
from fastapi.responses import JSONResponse
|
||||
from aioredis import Redis
|
||||
from redis.asyncio.client import Redis
|
||||
|
||||
from app.core.dependencies import AuthPermission, redis_getter
|
||||
from app.core.logger import logger
|
||||
|
||||
@@ -5,7 +5,7 @@ from typing import Union, Dict
|
||||
from fastapi import APIRouter, Depends, Request, BackgroundTasks, WebSocket
|
||||
from fastapi.responses import JSONResponse, StreamingResponse
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from aioredis import Redis
|
||||
from redis.asyncio.client import Redis
|
||||
|
||||
from app.config.setting import settings
|
||||
from app.common.response import ErrorResponse, SuccessResponse
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from fastapi import APIRouter, Body, Depends, Path, Query, Request, UploadFile
|
||||
from fastapi.responses import JSONResponse, StreamingResponse
|
||||
from aioredis import Redis
|
||||
from redis.asyncio.client import Redis
|
||||
|
||||
from app.api.v1.params.system.config_param import ConfigQueryParams
|
||||
from app.common.request import PaginationService
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import json
|
||||
from fastapi import APIRouter, Body, Depends, Path, Query
|
||||
from fastapi.responses import JSONResponse, StreamingResponse
|
||||
from aioredis import Redis
|
||||
from redis.asyncio.client import Redis
|
||||
|
||||
from app.common.response import StreamResponse, SuccessResponse
|
||||
from app.core.base_params import PaginationQueryParams
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from aioredis import Redis
|
||||
from redis.asyncio.client import Redis
|
||||
|
||||
from app.common.enums import RedisInitKeyConfig
|
||||
from app.api.v1.schemas.monitor.cache_schema import CacheMonitorSchema, CacheInfoSchema
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import json
|
||||
from typing import Dict, List, Optional
|
||||
from aioredis import Redis
|
||||
from redis.asyncio.client import Redis
|
||||
|
||||
from app.common.enums import RedisInitKeyConfig
|
||||
from app.core.exceptions import CustomException
|
||||
|
||||
@@ -4,7 +4,7 @@ import json
|
||||
import uuid
|
||||
from typing import Dict, Union, NewType
|
||||
from fastapi import Request
|
||||
from aioredis import Redis
|
||||
from redis.asyncio.client import Redis
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from datetime import datetime, timedelta
|
||||
from user_agents import parse
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
import json
|
||||
from typing import Any, Dict, List, Union
|
||||
|
||||
from aioredis import Redis
|
||||
from redis.asyncio.client import Redis
|
||||
from fastapi import UploadFile
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from aioredis import Redis
|
||||
from redis.asyncio.client import Redis
|
||||
|
||||
from app.api.v1.params.system.config_param import ConfigQueryParams
|
||||
from app.api.v1.schemas.system.auth_schema import AuthSchema
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import json
|
||||
from typing import Any, List, Dict
|
||||
from aioredis import Redis
|
||||
from redis.asyncio.client import Redis
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.api.v1.schemas.system.auth_schema import AuthSchema
|
||||
|
||||
Reference in New Issue
Block a user