fix: clean up logger info message formatting and remove unused import in rate limit tests

This commit is contained in:
MythEclipse
2026-05-18 21:19:38 +07:00
parent 825e969569
commit 0bc12651db
3 changed files with 11 additions and 8 deletions
+7 -6
View File
@@ -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!,
+3 -1
View File
@@ -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 -1
View File
@@ -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';