MCPcopy
hub / github.com/redis/redis-py / read_response

Method read_response

redis/_parsers/resp2.py:13–27  ·  view source on GitHub ↗
(
        self, disable_decoding=False, timeout: Union[float, object] = SENTINEL
    )

Source from the content-addressed store, hash-verified

11 """RESP2 protocol implementation"""
12
13 def read_response(
14 self, disable_decoding=False, timeout: Union[float, object] = SENTINEL
15 ):
16 pos = self._buffer.get_pos() if self._buffer else None
17 try:
18 result = self._read_response(
19 disable_decoding=disable_decoding, timeout=timeout
20 )
21 except BaseException:
22 if self._buffer:
23 self._buffer.rewind(pos)
24 raise
25 else:
26 self._buffer.purge()
27 return result
28
29 def _read_response(
30 self, disable_decoding=False, timeout: Union[float, object] = SENTINEL

Callers 11

parse_responseMethod · 0.45
next_commandMethod · 0.45
_start_monitorMethod · 0.45
try_readMethod · 0.45
resetMethod · 0.45
_re_authMethod · 0.45
_re_auth_asyncMethod · 0.45
_re_authMethod · 0.45
_re_auth_asyncMethod · 0.45
on_connectMethod · 0.45
resetMethod · 0.45

Calls 4

_read_responseMethod · 0.95
get_posMethod · 0.80
rewindMethod · 0.80
purgeMethod · 0.80

Tested by

no test coverage detected