Skip to content

Commit

Permalink
chore: update redis dependency and refactor Redis imports
Browse files Browse the repository at this point in the history
- Update redis dependency from aioredis==2.0.1 to redis==4.5.5
- Refactor Redis imports to use the asyncio module from redis package instead of aioredis module
  • Loading branch information
pankaj28843 committed Jun 21, 2023
1 parent c3232f8 commit c90a770
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
aioredis==2.0.1
redis==4.5.5
alembic==1.9.1
bcrypt
databases[asyncpg]==0.7.0
Expand Down
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from contextlib import asynccontextmanager
from typing import AsyncGenerator

import aioredis
import sentry_sdk
from fastapi import FastAPI
from starlette.middleware.cors import CORSMiddleware

from redis import asyncio as aioredis
from src import redis
from src.auth.router import router as auth_router
from src.config import app_configs, settings
Expand Down
3 changes: 1 addition & 2 deletions src/redis.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from datetime import timedelta
from typing import Optional

from aioredis import Redis

from redis.asyncio import Redis
from src.models import ORJSONModel

redis_client: Redis = None # type: ignore
Expand Down

0 comments on commit c90a770

Please sign in to comment.