rewritten crap
This commit is contained in:
11
limiter/redis_client.py
Normal file
11
limiter/redis_client.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import redis.asyncio as redis
|
||||
|
||||
import backend.config
|
||||
|
||||
pool = redis.ConnectionPool.from_url(backend.config.REDIS_URL)
|
||||
|
||||
|
||||
def get_client() -> redis.Redis:
|
||||
global pool
|
||||
client = redis.Redis.from_pool(pool)
|
||||
return client
|
||||
Reference in New Issue
Block a user