3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 02:25:01 +00:00

debug: reduce 'lowest global remaining' console spam

The lowest global remaining rate limit is now only logged when it's
below 30, which usually indicates an unusually high amount of API calls.
This commit is contained in:
Dragory 2022-01-22 17:20:44 +02:00
parent 2b763ce554
commit 9487cb9dfb

View file

@ -390,8 +390,10 @@ connect().then(async () => {
}, 100);
setInterval(() => {
// FIXME: Debug
if (lowestGlobalRemaining < 30) {
// tslint:disable-next-line:no-console
console.log("Lowest global remaining in the past 15 seconds:", lowestGlobalRemaining);
console.log("[DEBUG] Lowest global remaining in the past 15 seconds:", lowestGlobalRemaining);
}
lowestGlobalRemaining = Infinity;
}, 15000);