feature(redis): enable key space notifications by default

This commit is contained in:
Houkime 2024-04-22 14:50:08 +00:00
parent 8d099c9a22
commit b204d4a9b3
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()