(
parser: CommandParser,
key: RedisArgument,
group: RedisArgument,
consumer: RedisArgument,
minIdleTime: number,
id: RedisVariadicArgument,
options?: XClaimOptions
)
| 22 | export default { |
| 23 | IS_READ_ONLY: false, |
| 24 | parseCommand( |
| 25 | parser: CommandParser, |
| 26 | key: RedisArgument, |
| 27 | group: RedisArgument, |
| 28 | consumer: RedisArgument, |
| 29 | minIdleTime: number, |
| 30 | id: RedisVariadicArgument, |
| 31 | options?: XClaimOptions |
| 32 | ) { |
| 33 | parser.push('XCLAIM'); |
| 34 | parser.pushKey(key); |
| 35 | parser.push(group, consumer, minIdleTime.toString()); |
| 36 | parser.pushVariadic(id); |
| 37 | |
| 38 | if (options?.IDLE !== undefined) { |
| 39 | parser.push('IDLE', options.IDLE.toString()); |
| 40 | } |
| 41 | |
| 42 | if (options?.TIME !== undefined) { |
| 43 | parser.push( |
| 44 | 'TIME', |
| 45 | (options.TIME instanceof Date ? options.TIME.getTime() : options.TIME).toString() |
| 46 | ); |
| 47 | } |
| 48 | |
| 49 | if (options?.RETRYCOUNT !== undefined) { |
| 50 | parser.push('RETRYCOUNT', options.RETRYCOUNT.toString()); |
| 51 | } |
| 52 | |
| 53 | if (options?.FORCE) { |
| 54 | parser.push('FORCE'); |
| 55 | } |
| 56 | |
| 57 | if (options?.LASTID !== undefined) { |
| 58 | parser.push('LASTID', options.LASTID); |
| 59 | } |
| 60 | }, |
| 61 | /** |
| 62 | * Transforms the raw XCLAIM reply into an array of messages |
| 63 | * |
nothing calls this directly
no test coverage detected