Skip to content

follow-up to #1066: update redis to 5.0.0 which includes full fix for… #1081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions backend/btrixcloud/k8sapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
from kubernetes_asyncio.utils import create_from_dict
from kubernetes_asyncio.client.exceptions import ApiException

from redis.asyncio import Redis
from redis.asyncio.connection import ConnectionPool
from redis import asyncio as aioredis

from fastapi.templating import Jinja2Templates
from .utils import get_templates_dir, dt_now, to_k8s_date
Expand Down Expand Up @@ -67,14 +66,9 @@ def get_redis_url(self, crawl_id):

async def get_redis_client(self, redis_url):
"""return redis client with correct params for one-time use"""
# manual settings until redis 5.0.0 is released
pool = ConnectionPool.from_url(redis_url, decode_responses=True)
redis = Redis(
connection_pool=pool,
decode_responses=True,
return aioredis.from_url(
redis_url, decode_responses=True, auto_close_connection_pool=True
)
redis.auto_close_connection_pool = True
return redis

# pylint: disable=too-many-arguments
async def new_crawl_job(
Expand Down
2 changes: 1 addition & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ loguru
aiofiles
kubernetes-asyncio==22.6.5
aiobotocore
redis>=5.0.0rc2
redis>=5.0.0
pyyaml
jinja2
humanize
Expand Down