mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-22 04:01:27 +00:00
feature(redis): enable key space notifications by default
This commit is contained in:
parent
8d099c9a22
commit
b204d4a9b3
|
@ -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:
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue