From 83f426e04a4a7f5fafe3e63e6a78c85be5e48b04 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Mon, 25 Jul 2022 22:56:34 +0100 Subject: Bump async-rediscache to v1.0.0-rc2 --- botcore/_bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'botcore/_bot.py') diff --git a/botcore/_bot.py b/botcore/_bot.py index 8bea4385..e3d9aac3 100644 --- a/botcore/_bot.py +++ b/botcore/_bot.py @@ -234,10 +234,10 @@ class BotBase(commands.Bot): ) self.http.connector = self._connector - if getattr(self, "redis_session", False) and self.redis_session.closed: + if getattr(self, "redis_session", False) and not self.redis_session.valid: # If the RedisSession was somehow closed, we try to reconnect it # here. Normally, this shouldn't happen. - await self.redis_session.connect() + await self.redis_session.connect(ping=True) # Create dummy stats client first, in case `statsd_url` is unreachable or None self.stats = AsyncStatsClient(loop, "127.0.0.1") -- cgit v1.2.3 From 2f7e059df4a91afb5fc686bc99e90f7baf8b1abd Mon Sep 17 00:00:00 2001 From: ChrisJL Date: Mon, 25 Jul 2022 23:57:57 +0100 Subject: Remove explicit cleanup of the redis session (#111) --- botcore/_bot.py | 3 --- pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'botcore/_bot.py') diff --git a/botcore/_bot.py b/botcore/_bot.py index e3d9aac3..bb25c0b5 100644 --- a/botcore/_bot.py +++ b/botcore/_bot.py @@ -284,8 +284,5 @@ class BotBase(commands.Bot): if getattr(self.stats, "_transport", False): self.stats._transport.close() - if getattr(self, "redis_session", False): - await self.redis_session.close() - if self._statsd_timerhandle: self._statsd_timerhandle.cancel() diff --git a/pyproject.toml b/pyproject.toml index ca5f0d57..bffaf1b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "bot-core" -version = "8.0.0-beta.3" +version = "8.0.0-beta.4" description = "Bot-Core provides the core functionality and utilities for the bots of the Python Discord community." authors = ["Python Discord "] license = "MIT" -- cgit v1.2.3