3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +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 feeb048855
commit 9d301a4242
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

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