From e79de2b37730c2ea9dcc1f0cff2e14b854be78e9 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Thu, 8 Sep 2022 09:44:27 +0100 Subject: [PATCH] Add aioredis --- db.py | 4 ++-- docker/requirements.txt | 1 + requirements.txt | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/db.py b/db.py index 148cfb4..5cf7a30 100644 --- a/db.py +++ b/db.py @@ -8,14 +8,14 @@ from redis import StrictRedis import util from schemas.mc_s import schema - +import aioredis configuration = manticoresearch.Configuration(host="http://monolith-db-1:9308") api_client = manticoresearch.ApiClient(configuration) api_instance = manticoresearch.IndexApi(api_client) log = util.get_logger("db") 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): """ diff --git a/docker/requirements.txt b/docker/requirements.txt index 5595557..8ec92ae 100644 --- a/docker/requirements.txt +++ b/docker/requirements.txt @@ -7,3 +7,4 @@ python-dotenv manticoresearch numpy ujson +aioredis[hiredis] diff --git a/requirements.txt b/requirements.txt index b9ebdc6..860086f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,3 +8,4 @@ python-dotenv manticoresearch numpy ujson +aioredis[hiredis]