1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

XINFO CONSUMERS - add support for the inactive field (#2490)

* Support XINFO CONSUMERS: Added the inactive field

* Update XINFO_CONSUMERS.ts

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
This commit is contained in:
Codrin-Mihai Chira
2023-05-21 15:06:46 +03:00
committed by GitHub
parent 8d37c115e6
commit d4f194352f
2 changed files with 9 additions and 5 deletions

View File

@@ -15,12 +15,14 @@ type XInfoConsumersReply = Array<{
name: RedisCommandArgument;
pending: number;
idle: number;
inactive: number;
}>;
export function transformReply(rawReply: Array<any>): XInfoConsumersReply {
return rawReply.map(consumer => ({
name: consumer[1],
pending: consumer[3],
idle: consumer[5]
idle: consumer[5],
inactive: consumer[7]
}));
}