fix: clean up logger info message formatting and remove unused import in rate limit tests
This commit is contained in:
+7
-6
@@ -32,12 +32,13 @@ if (missing.length > 0) {
|
||||
|
||||
export const config: AppConfig = {
|
||||
botToken: process.env.BOT_TOKEN!,
|
||||
additionalBotTokens: process.env.NODE_ENV === 'test'
|
||||
? []
|
||||
: (process.env.ADDITIONAL_BOT_TOKENS || '')
|
||||
.split(',')
|
||||
.map((t) => t.trim())
|
||||
.filter((t) => t !== ''),
|
||||
additionalBotTokens:
|
||||
process.env.NODE_ENV === 'test'
|
||||
? []
|
||||
: (process.env.ADDITIONAL_BOT_TOKENS || '')
|
||||
.split(',')
|
||||
.map((t) => t.trim())
|
||||
.filter((t) => t !== ''),
|
||||
storageChatId: parseInt(process.env.STORAGE_CHANNEL_ID!, 10),
|
||||
baseUrl: process.env.BASE_URL!,
|
||||
databaseUrl: process.env.DATABASE_URL!,
|
||||
|
||||
@@ -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