Skip to content

Commit

Permalink
fix(status): Only send relevant info
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Crespi committed Mar 26, 2020
1 parent 3d6c857 commit 8a899c2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/framework/services/RabbitMq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -508,10 +508,9 @@ export class RabbitMqService extends IMService {
cmdProcessed: this.client.stats.cmdProcessed,
cmdErrors: this.client.stats.cmdErrors,
cmdHttpErrors: [...this.client.stats.cmdHttpErrors.entries()].map(([code, count]) => ({ code, count })),
httpRequestsQueued: Object.keys(req.ratelimits).reduce(
(acc, endpoint) => acc.concat([{ endpoint, count: req.ratelimits[endpoint]._queue.length as number }]),
[]
)
httpRequestsQueued: Object.keys(req.ratelimits)
.filter((endpoint) => req.ratelimits[endpoint]._queue.length > 0)
.reduce((acc, endpoint) => acc.concat([{ endpoint, count: req.ratelimits[endpoint]._queue.length }]), [])
};
}
}

0 comments on commit 8a899c2

Please sign in to comment.