feature(redis): enable key space notifications by default

This commit is contained in:
Houkime 2024-04-22 14:50:08 +00:00 committed by Inex Code
parent fff8a49992
commit 6510d4cac6
2 changed files with 2 additions and 1 deletions

View file

@ -29,6 +29,8 @@ class RedisPool:
url,
decode_responses=True,
)
# TODO: inefficient, this is probably done each time we connect
self.get_connection().config_set("notify-keyspace-events", "KEA")
@staticmethod
def connection_url(dbnumber: int) -> str:

View file

@ -15,7 +15,6 @@ STOPWORD = "STOP"
def empty_redis(event_loop):
r = RedisPool().get_connection()
r.flushdb()
r.config_set("notify-keyspace-events", "KEA")
assert r.config_get("notify-keyspace-events")["notify-keyspace-events"] == "AKE"
yield r
r.flushdb()