File tree 2 files changed +4
-10
lines changed
2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 13
13
from kubernetes_asyncio .utils import create_from_dict
14
14
from kubernetes_asyncio .client .exceptions import ApiException
15
15
16
- from redis .asyncio import Redis
17
- from redis .asyncio .connection import ConnectionPool
16
+ from redis import asyncio as aioredis
18
17
19
18
from fastapi .templating import Jinja2Templates
20
19
from .utils import get_templates_dir , dt_now , to_k8s_date
@@ -67,14 +66,9 @@ def get_redis_url(self, crawl_id):
67
66
68
67
async def get_redis_client (self , redis_url ):
69
68
"""return redis client with correct params for one-time use"""
70
- # manual settings until redis 5.0.0 is released
71
- pool = ConnectionPool .from_url (redis_url , decode_responses = True )
72
- redis = Redis (
73
- connection_pool = pool ,
74
- decode_responses = True ,
69
+ return aioredis .from_url (
70
+ redis_url , decode_responses = True , auto_close_connection_pool = True
75
71
)
76
- redis .auto_close_connection_pool = True
77
- return redis
78
72
79
73
# pylint: disable=too-many-arguments
80
74
async def new_crawl_job (
Original file line number Diff line number Diff line change 5
5
aiofiles
6
6
kubernetes-asyncio == 22.6.5
7
7
aiobotocore
8
- redis >= 5.0.0rc2
8
+ redis >= 5.0.0
9
9
pyyaml
10
10
jinja2
11
11
humanize
You can’t perform that action at this time.
0 commit comments