/redis-kesypace-event.rb Secret
Last active
January 12, 2017 10:58
Star
You must be signed in to star a gist
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