From e7e90d5462c87b2e108eceacf729f63127832a49 Mon Sep 17 00:00:00 2001 From: Dustin Pianalto Date: Wed, 25 Dec 2019 17:37:05 -0900 Subject: [PATCH] Add health check interval to redis connection --- geeksbot/imports/geeksbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geeksbot/imports/geeksbot.py b/geeksbot/imports/geeksbot.py index 3dd5cf6..7064a26 100644 --- a/geeksbot/imports/geeksbot.py +++ b/geeksbot/imports/geeksbot.py @@ -25,8 +25,8 @@ class Geeksbot(commands.Bot): self.config_dir = 'geeksbot/config' self.config_file = 'bot_config.json' self.extension_dir = 'exts' - self.cache = redis.Redis(host=os.environ['REDIS_HOST'], port=os.environ['REDIS_PORT'], db=os.environ['REDIS_DB'], charset="utf-8", decode_responses=True) - self.settings_cache = redis.Redis(host=os.environ['REDIS_HOST'], port=os.environ['REDIS_PORT'], db=1, charset="utf-8", decode_responses=True) + self.cache = redis.Redis(host=os.environ['REDIS_HOST'], port=os.environ['REDIS_PORT'], db=os.environ['REDIS_DB'], charset="utf-8", decode_responses=True, health_check_interval=10) + self.settings_cache = redis.Redis(host=os.environ['REDIS_HOST'], port=os.environ['REDIS_PORT'], db=1, charset="utf-8", decode_responses=True, health_check_interval=10) self.token = self.settings_cache.get('DISCORD_TOKEN') self.api_token = self.settings_cache.get('API_TOKEN') self.aio_session = aiohttp.ClientSession(loop=self.loop)