Skip to content

Commit

Permalink
Fix: monitor the correct redis db for expired events (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueBrain authored Oct 28, 2021
1 parent 53cb04c commit 6b1f9e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion game_coordinator/database/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 6b1f9e0

Please sign in to comment.