Skip to content

Commit ab3bec0

Browse files
authored
Merge pull request #15 from TheBluCoder/dev-branch
fix TypeError: duplicate base class TimeoutError in workflow file
2 parents 69dc997 + 72142e4 commit ab3bec0

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

backend/mainService/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ tenacity==9.0.0
2222
urllib3==2.3.0
2323
lxml==5.3.0
2424
google-genai
25+
redis>=4.2.0
26+

backend/metricsService/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
aioredis==2.0.1
1+
redis>=4.2.0
22
fastapi==0.115.11
33
issn==0.0.3
44
pydantic==2.10.6

backend/metricsService/src/utils/cache_config.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,27 @@
2020
"""
2121

2222
from typing import Optional
23-
import aioredis
23+
from redis import asyncio as aioredis
2424
from src.utils.logging_config import get_logger
2525

2626
logger = get_logger(__name__)
2727

2828
# Redis connection settings
29-
REDIS_URL = "redis://localhost:6379"
29+
# REDIS_URL = "redis://localhost:6379"
3030
redis_client: Optional[aioredis.Redis] = None
3131

3232
async def init_redis():
3333
"""Initialize Redis connection"""
3434
global redis_client
3535
try:
36-
redis_client = await aioredis.from_url(
37-
REDIS_URL,
38-
encoding="utf-8",
39-
decode_responses=True
40-
)
36+
redis_client = aioredis.Redis(
37+
host='localhost',
38+
port=6379,
39+
db=0,
40+
decode_responses=True
41+
)
42+
43+
4144
except Exception as e:
4245
logger.error(f"Failed to initialize Redis connection: {str(e)}")
4346
raise

0 commit comments

Comments
 (0)