small fixes
This commit is contained in:
parent
830b9e94a1
commit
01e0fab0df
5 changed files with 13 additions and 12 deletions
2
.env
2
.env
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
# Core Application Settings
|
||||
NODE_ENV=development
|
||||
LOG_LEVEL=info
|
||||
LOG_LEVEL=error
|
||||
|
||||
# Data Service Configuration
|
||||
DATA_SERVICE_PORT=2001
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import { ProxyManager } from '@stock-bot/utils';
|
|||
import { exchangeRoutes, healthRoutes, queueRoutes } from './routes';
|
||||
|
||||
const config = initializeConfig();
|
||||
console.log('Data Service Configuration:', JSON.stringify(config, null, 2));
|
||||
const serviceConfig = config.service;
|
||||
const databaseConfig = config.database;
|
||||
const queueConfig = config.queue;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { getLogger } from '@stock-bot/logger';
|
||||
import {
|
||||
handlerRegistry,
|
||||
import {
|
||||
createJobHandler,
|
||||
type HandlerConfigWithSchedule
|
||||
handlerRegistry,
|
||||
type HandlerConfigWithSchedule
|
||||
} from '@stock-bot/queue';
|
||||
import type { SymbolSpiderJob } from './qm.tasks';
|
||||
|
||||
|
|
@ -62,16 +62,17 @@ export function initializeQMProvider() {
|
|||
{
|
||||
type: 'session-management',
|
||||
operation: 'create-sessions',
|
||||
cronPattern: '*/15 * * * * *', // Every minute
|
||||
cronPattern: '0 */15 * * *', // Every 15 minutes
|
||||
priority: 7,
|
||||
immediately: true,
|
||||
immediately: true, // Don't run on startup to avoid blocking
|
||||
description: 'Create and maintain QM sessions',
|
||||
},
|
||||
{
|
||||
type: 'qm-maintnance',
|
||||
operation: 'spider-symbol-search',
|
||||
cronPattern: '0 0 * * 0', // Every minute
|
||||
cronPattern: '0 0 * * 0', // Every Sunday at midnight
|
||||
priority: 10,
|
||||
immediately: true, // Don't run on startup
|
||||
description: 'Comprehensive symbol search using QM API',
|
||||
},
|
||||
],
|
||||
|
|
|
|||
|
|
@ -57,10 +57,9 @@
|
|||
"retryDelay": 100
|
||||
}
|
||||
},
|
||||
"logging": {
|
||||
"log": {
|
||||
"level": "info",
|
||||
"format": "json",
|
||||
"prettyPrint": true
|
||||
"format": "json"
|
||||
},
|
||||
"providers": {
|
||||
"yahoo": {
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ export function getRedisConnection(config: RedisConfig) {
|
|||
maxRetriesPerRequest: null, // Required by BullMQ
|
||||
enableReadyCheck: false,
|
||||
connectTimeout: isTest ? 1000 : 3000,
|
||||
lazyConnect: true,
|
||||
keepAlive: false,
|
||||
lazyConnect: false, // Changed from true to ensure connection is established immediately
|
||||
keepAlive: true, // Changed from false to maintain persistent connections
|
||||
retryStrategy: (times: number) => {
|
||||
const maxRetries = isTest ? 1 : 3;
|
||||
if (times > maxRetries) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue