summaryrefslogtreecommitdiff
path: root/redis/asyncio/client.py
diff options
context:
space:
mode:
authordvora-h <67596500+dvora-h@users.noreply.github.com>2023-01-05 14:33:10 +0200
committerGitHub <noreply@github.com>2023-01-05 14:33:10 +0200
commite67d15c490585de3f350b91ee9a4e12d3ba134b7 (patch)
tree97edd622ca5c147fd3d7878a11c7b5ace427d3e6 /redis/asyncio/client.py
parentf14ed1fc822a88a21bbfc64e36bf8b09e5c9386c (diff)
downloadredis-py-e67d15c490585de3f350b91ee9a4e12d3ba134b7.tar.gz
replase get_event_loop wite get_running_loop (#2530)
Diffstat (limited to 'redis/asyncio/client.py')
-rw-r--r--redis/asyncio/client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/redis/asyncio/client.py b/redis/asyncio/client.py
index 5a2c496..8fd9cd2 100644
--- a/redis/asyncio/client.py
+++ b/redis/asyncio/client.py
@@ -453,7 +453,7 @@ class Redis(
f"Unclosed client session {self!r}", ResourceWarning, source=self
)
context = {"client": self, "message": self._DEL_MESSAGE}
- asyncio.get_event_loop().call_exception_handler(context)
+ asyncio.get_running_loop().call_exception_handler(context)
async def close(self, close_connection_pool: Optional[bool] = None) -> None:
"""
@@ -798,7 +798,7 @@ class PubSub:
if (
conn.health_check_interval
- and asyncio.get_event_loop().time() > conn.next_health_check
+ and asyncio.get_running_loop().time() > conn.next_health_check
):
await conn.send_command(
"PING", self.HEALTH_CHECK_MESSAGE, check_health=False