diff options
| author | 2020-05-23 11:14:13 -0700 | |
|---|---|---|
| committer | 2020-05-23 11:14:13 -0700 | |
| commit | 923d03a8040251ae7766b9655a3d0ff9f8413c8b (patch) | |
| tree | 60d56b6e29aa7184ca0ca7a0ece5ebcf5c94ebe3 | |
| parent | Remove redis session mock from MockBot (diff) | |
Show a warning when redis pool isn't closed
| -rw-r--r-- | bot/bot.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/bot.py b/bot/bot.py index 224f5f4e4..bf7f9c9df 100644 --- a/bot/bot.py +++ b/bot/bot.py @@ -112,6 +112,11 @@ class Bot(commands.Bot): "The previous connector was not closed; it will remain open and be overwritten" ) + if self.redis_session and not self.redis_session.closed: + log.warning( + "The previous redis pool was not closed; it will remain open and be overwritten" + ) + # Create the redis session self.loop.create_task(self._create_redis_session()) |