12 lines
227 B
Python
12 lines
227 B
Python
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
|