Method: Redis#unsubscribe
- Defined in:
- lib/redis.rb
#unsubscribe(*channels) ⇒ Object
Stop listening for messages posted to the given channels.
1981 1982 1983 1984 1985 1986 |
# File 'lib/redis.rb', line 1981 def unsubscribe(*channels) synchronize do |client| raise RuntimeError, "Can't unsubscribe if not subscribed." unless subscribed? client.unsubscribe(*channels) end end |