diff options
author | Salvatore Sanfilippo <antirez@gmail.com> | 2018-02-15 21:36:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-15 21:36:32 +0100 |
commit | 7830f8492fde42eb213ee82131cc1c982bb319e1 (patch) | |
tree | 2d7edd26e88e38eadb59708bbb00ba3660487845 /src/notify.c | |
parent | f4dc736ccadedefe156a3b9c278e06cb2c55f0a1 (diff) | |
parent | 0a36196ce47e1ee6db6c2e5461777e72ea504143 (diff) | |
download | redis-7830f8492fde42eb213ee82131cc1c982bb319e1.tar.gz |
Merge pull request #4479 from dvirsky/notify
Keyspace notifications API for modules
Diffstat (limited to 'src/notify.c')
-rw-r--r-- | src/notify.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/notify.c b/src/notify.c index f98cb9204..6dd72f0a6 100644 --- a/src/notify.c +++ b/src/notify.c @@ -100,6 +100,12 @@ void notifyKeyspaceEvent(int type, char *event, robj *key, int dbid) { int len = -1; char buf[24]; + /* If any modules are interested in events, notify the module system now. + * This bypasses the notifications configuration, but the module engine + * will only call event subscribers if the event type matches the types + * they are interested in. */ + moduleNotifyKeyspaceEvent(type, event, key, dbid); + /* If notifications for this class of events are off, return ASAP. */ if (!(server.notify_keyspace_events & type)) return; |