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

Method re_auth_callback

redis/asyncio/connection.py:1714–1727  ·  view source on GitHub ↗
(self, token: TokenInterface)

Source from the content-addressed store, hash-verified

1712 conn.retry = retry
1713
1714 async def re_auth_callback(self, token: TokenInterface):
1715 async with self._lock:
1716 for conn in self._available_connections:
1717 await conn.retry.call_with_retry(
1718 lambda: conn.send_command(
1719 "AUTH", token.try_get("oid"), token.get_value()
1720 ),
1721 lambda error: self._mock(error),
1722 )
1723 await conn.retry.call_with_retry(
1724 lambda: conn.read_response(), lambda error: self._mock(error)
1725 )
1726 for conn in self._in_use_connections:
1727 conn.set_re_auth_token(token)
1728
1729 async def _mock(self, error: RedisError):
1730 """

Callers

nothing calls this directly

Calls 7

_mockMethod · 0.95
call_with_retryMethod · 0.45
send_commandMethod · 0.45
try_getMethod · 0.45
get_valueMethod · 0.45
read_responseMethod · 0.45
set_re_auth_tokenMethod · 0.45

Tested by

no test coverage detected