From 6b1f9e02c319a2c503bdb7ee9949a2026a74e77d Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Thu, 28 Oct 2021 20:17:34 +0200 Subject: [PATCH] Fix: monitor the correct redis db for expired events (#75) --- game_coordinator/database/redis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game_coordinator/database/redis.py b/game_coordinator/database/redis.py index 1115e55..586c42c 100644 --- a/game_coordinator/database/redis.py +++ b/game_coordinator/database/redis.py @@ -98,7 +98,7 @@ async def _monitor_expire(self): log.warning("Couldn't set configuration setting 'notify-keyspace-events' to 'Ex'. Please do this manually.") channel = self._redis.pubsub() - await channel.subscribe("__keyevent@0__:expired") + await channel.subscribe(f"__keyevent@{self._redis.connection_pool.connection_kwargs.get('db', 0)}__:expired") while True: async for message in channel.listen():