Method: ActiveOrm::Redis::List.pop_blocking
- Defined in:
- lib/active_orm/redis/list.rb
.pop_blocking(keys, opts = {}) ⇒ Object
116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/active_orm/redis/list.rb', line 116 def pop_blocking(keys, opts = {}) timeout = opts[:timeout] || 0 value = if append?(opts[:order] || :prepend) client.brpop(keys, timeout) else client.blpop(keys, timeout) end value = (value) if evaluate? value end |