fix: clean up logger info message formatting and remove unused import in rate limit tests
This commit is contained in:
+2
-1
@@ -32,7 +32,8 @@ if (missing.length > 0) {
|
||||
|
||||
export const config: AppConfig = {
|
||||
botToken: process.env.BOT_TOKEN!,
|
||||
additionalBotTokens: process.env.NODE_ENV === 'test'
|
||||
additionalBotTokens:
|
||||
process.env.NODE_ENV === 'test'
|
||||
? []
|
||||
: (process.env.ADDITIONAL_BOT_TOKENS || '')
|
||||
.split(',')
|
||||
|
||||
@@ -30,7 +30,9 @@ const executeWithBotRetry = async (
|
||||
attemptedBots++;
|
||||
|
||||
if (attemptedBots < bots.length) {
|
||||
logger.info(`Bot Index ${prevIndex} hit 429. Instantly rotating to Bot Index ${nextIndex}...`);
|
||||
logger.info(
|
||||
`Bot Index ${prevIndex} hit 429. Instantly rotating to Bot Index ${nextIndex}...`,
|
||||
);
|
||||
return executeWithBotRetry(action, retries, attemptedBots);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @ts-nocheck
|
||||
import { afterEach, beforeEach, describe, expect, it, spyOn } from 'bun:test';
|
||||
import { beforeEach, describe, expect, it, spyOn } from 'bun:test';
|
||||
import logger from '../src/utils/logger';
|
||||
import { checkRateLimit, cleanupRateLimitCache } from '../src/utils/rateLimit';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user