fix(bot): 🐛 Redis failing to connect in different event loops.

This commit is contained in:
Nyeki.py
2024-10-23 23:33:25 -03:00
parent 7acfb87910
commit c5143de3ba
11 changed files with 133 additions and 90 deletions
+5 -2
View File
@@ -3,10 +3,13 @@ async def flush():
import asyncpg.exceptions
import redis.asyncio as aredis
from payphone.db import models
from payphone.core import constants, utils
from payphone.core.redis import redis
from payphone.core import constants, utils, config
redis = aredis.Redis(host="localhost" if config.IS_DEBUG else "redis")
pipe = redis.pipeline()