class Redis
def xpending(key, group, *args)
-
(Array
- the pending entries details if options were specified) -
(Hash)
- the summary of pending entries
Parameters:
-
consumer
(String
) -- the consumer name -
count
(Integer
) -- count the number of entries as limit -
end
(String
) -- end last entry id of range -
start
(String
) -- start first entry id of range -
group
(String
) -- the consumer group name -
key
(String
) -- the stream key
Other tags:
- Example: With range and consumer options -
Example: With range options -
Example: With key and group -
def xpending(key, group, *args) command_args = [:xpending, key, group] case args.size when 0, 3, 4 command_args.concat(args) else raise ArgumentError, "wrong number of arguments (given #{args.size + 2}, expected 2, 5 or 6)" end summary_needed = args.empty? blk = summary_needed ? HashifyStreamPendings : HashifyStreamPendingDetails synchronize { |client| client.call(command_args, &blk) } end