File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 1
- import socket
2
-
3
1
from valkey import Valkey
4
- from valkey .exceptions import ConnectionError , ResponseError , TimeoutError
5
2
from valkey .typing import KeyT , EncodableT
6
3
7
4
from django_valkey .async_cache .client import AsyncDefaultClient
8
- from django_valkey .base_client import DEFAULT_TIMEOUT , HerdCommonMethods
5
+ from django_valkey .base_client import (
6
+ DEFAULT_TIMEOUT ,
7
+ HerdCommonMethods ,
8
+ _main_exceptions ,
9
+ )
9
10
from django_valkey .exceptions import ConnectionInterrupted
10
11
11
- _main_exceptions = (ConnectionError , ResponseError , TimeoutError , socket .timeout )
12
-
13
12
14
13
class AsyncHerdClient (HerdCommonMethods , AsyncDefaultClient ):
15
14
async def set (
Original file line number Diff line number Diff line change 1
- import socket
2
1
from collections .abc import Iterable
3
2
from typing import Any
4
3
5
4
from valkey import Valkey
6
- from valkey .exceptions import ConnectionError , ResponseError , TimeoutError
7
5
from valkey .typing import KeyT , EncodableT
8
6
9
7
from django_valkey .base_client import (
10
8
DEFAULT_TIMEOUT ,
11
9
Backend ,
12
10
HerdCommonMethods ,
11
+ _main_exceptions ,
13
12
)
14
13
from django_valkey .client .default import DefaultClient
15
14
from django_valkey .exceptions import ConnectionInterrupted
16
15
17
- _main_exceptions = (ConnectionError , ResponseError , TimeoutError , socket .timeout )
18
-
19
16
20
17
class HerdClient (HerdCommonMethods , DefaultClient ):
21
18
def set (
You can’t perform that action at this time.
0 commit comments