This commit is contained in:
Boki 2025-06-25 11:38:23 -04:00
parent 3a7254708e
commit b63e58784c
41 changed files with 5762 additions and 4477 deletions

View file

@ -1,8 +1,8 @@
import { Queue as BullQueue, type Job } from 'bullmq';
import type { CacheProvider } from '@stock-bot/cache';
import { createCache } from '@stock-bot/cache';
import type { HandlerRegistry } from '@stock-bot/handler-registry';
import { getLogger } from '@stock-bot/logger';
import { Queue as BullQueue, type Job } from 'bullmq';
import { Queue, type QueueWorkerConfig } from './queue';
import { QueueRateLimiter } from './rate-limiter';
import { getFullQueueName, parseQueueName } from './service-utils';

View file

@ -7,10 +7,12 @@ export function getRedisConnection(config: RedisConfig) {
const isTest = process.env.NODE_ENV === 'test' || process.env['BUNIT'] === '1';
// In test mode, always use localhost
const testConfig = isTest ? {
host: 'localhost',
port: 6379,
} : config;
const testConfig = isTest
? {
host: 'localhost',
port: 6379,
}
: config;
const baseConfig = {
host: testConfig.host,