Method: Redis::Commands::Lists#brpop

Defined in:
lib/redis/commands/lists.rb

#brpop(*args) ⇒ nil, [String, String]

Remove and get the last element in a list, or block until one is available.

Parameters:

  • keys (String, Array<String>)

    one or more keys to perform the blocking pop on

  • options (Hash)
    • ‘:timeout => [Float, Integer]`: timeout in seconds, defaults to no timeout

Returns:

  • (nil, [String, String])
    • ‘nil` when the operation timed out

    • tuple of the list that was popped from and element was popped otherwise

See Also:



166
167
168
# File 'lib/redis/commands/lists.rb', line 166

def brpop(*args)
  _bpop(:brpop, args)
end