-
-
Save katpadi/2eca03737eb188707cc79e9969185eee to your computer and use it in GitHub Desktop.
redis-kesypace-event
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set it up. | |
$redis.config(:set, 'notify-keyspace-events', 'zE') | |
# Subscriber | |
$redis.psubscribe('__keyevent@*__:zrem') do |on| | |
on.pmessage do |pattern, channel, message| | |
puts "==== AFTER zrem EVENT =====" | |
# Available things: | |
puts "pattern: #{pattern}" | |
puts "channel: #{channel}" | |
puts "message: #{message}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment