Method: Redis::Commands::Streams#xpending
- Defined in:
- lib/redis/commands/streams.rb
#xpending(key, group, *args, idle: nil) ⇒ Hash+
Fetches not acknowledging pending entries
375 376 377 378 379 380 381 382 383 384 385 386 387 388 |
# File 'lib/redis/commands/streams.rb', line 375 def xpending(key, group, *args, idle: nil) command_args = [:xpending, key, group] command_args << 'IDLE' << Integer(idle) if idle 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 send_command(command_args, &blk) end |