Add aioredis
This commit is contained in:
parent
79b1bee9e4
commit
e79de2b377
4
db.py
4
db.py
|
@ -8,14 +8,14 @@ from redis import StrictRedis
|
||||||
|
|
||||||
import util
|
import util
|
||||||
from schemas.mc_s import schema
|
from schemas.mc_s import schema
|
||||||
|
import aioredis
|
||||||
configuration = manticoresearch.Configuration(host="http://monolith-db-1:9308")
|
configuration = manticoresearch.Configuration(host="http://monolith-db-1:9308")
|
||||||
api_client = manticoresearch.ApiClient(configuration)
|
api_client = manticoresearch.ApiClient(configuration)
|
||||||
api_instance = manticoresearch.IndexApi(api_client)
|
api_instance = manticoresearch.IndexApi(api_client)
|
||||||
|
|
||||||
log = util.get_logger("db")
|
log = util.get_logger("db")
|
||||||
r = StrictRedis(unix_socket_path="/var/run/redis/redis.sock", db=0)
|
r = StrictRedis(unix_socket_path="/var/run/redis/redis.sock", db=0)
|
||||||
|
ar = aioredis.from_url("unix:///var/run/redis/redis.sock")
|
||||||
|
|
||||||
def store_message(msg):
|
def store_message(msg):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -7,3 +7,4 @@ python-dotenv
|
||||||
manticoresearch
|
manticoresearch
|
||||||
numpy
|
numpy
|
||||||
ujson
|
ujson
|
||||||
|
aioredis[hiredis]
|
||||||
|
|
|
@ -8,3 +8,4 @@ python-dotenv
|
||||||
manticoresearch
|
manticoresearch
|
||||||
numpy
|
numpy
|
||||||
ujson
|
ujson
|
||||||
|
aioredis[hiredis]
|
||||||
|
|
Loading…
Reference in New Issue