disabled some of the qm things for testing
This commit is contained in:
parent
06c65d6c2c
commit
710577eb3d
4 changed files with 14 additions and 14 deletions
|
|
@ -77,8 +77,8 @@
|
||||||
"port": 6379,
|
"port": 6379,
|
||||||
"db": 1
|
"db": 1
|
||||||
},
|
},
|
||||||
"workers": 5,
|
"workers": 1,
|
||||||
"concurrency": 5,
|
"concurrency": 1,
|
||||||
"enableScheduledJobs": true,
|
"enableScheduledJobs": true,
|
||||||
"defaultJobOptions": {
|
"defaultJobOptions": {
|
||||||
"attempts": 3,
|
"attempts": 3,
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,8 @@ import {
|
||||||
Operation,
|
Operation,
|
||||||
ScheduledOperation,
|
ScheduledOperation,
|
||||||
} from '@stock-bot/handlers';
|
} from '@stock-bot/handlers';
|
||||||
import type { DataIngestionServices } from '../../types';
|
|
||||||
import type { OperationRegistry } from '../../shared/operation-manager';
|
import type { OperationRegistry } from '../../shared/operation-manager';
|
||||||
import { createQMOperationRegistry } from './shared/operation-provider';
|
import type { DataIngestionServices } from '../../types';
|
||||||
import {
|
import {
|
||||||
checkSessions,
|
checkSessions,
|
||||||
createSession,
|
createSession,
|
||||||
|
|
@ -29,6 +28,7 @@ import {
|
||||||
updatePrices,
|
updatePrices,
|
||||||
updateSymbolInfo
|
updateSymbolInfo
|
||||||
} from './actions';
|
} from './actions';
|
||||||
|
import { createQMOperationRegistry } from './shared/operation-provider';
|
||||||
|
|
||||||
@Handler('qm')
|
@Handler('qm')
|
||||||
export class QMHandler extends BaseHandler<DataIngestionServices> {
|
export class QMHandler extends BaseHandler<DataIngestionServices> {
|
||||||
|
|
@ -99,7 +99,7 @@ export class QMHandler extends BaseHandler<DataIngestionServices> {
|
||||||
@Operation('update-symbol-info')
|
@Operation('update-symbol-info')
|
||||||
updateSymbolInfo = updateSymbolInfo;
|
updateSymbolInfo = updateSymbolInfo;
|
||||||
|
|
||||||
// @Disabled()
|
@Disabled()
|
||||||
@ScheduledOperation('schedule-symbol-info-updates', '0 */6 * * *', {
|
@ScheduledOperation('schedule-symbol-info-updates', '0 */6 * * *', {
|
||||||
priority: 7,
|
priority: 7,
|
||||||
immediately: false,
|
immediately: false,
|
||||||
|
|
@ -113,7 +113,7 @@ export class QMHandler extends BaseHandler<DataIngestionServices> {
|
||||||
@Operation('update-financials')
|
@Operation('update-financials')
|
||||||
updateFinancials = updateFinancials;
|
updateFinancials = updateFinancials;
|
||||||
|
|
||||||
// @Disabled()
|
@Disabled()
|
||||||
@ScheduledOperation('schedule-financials-updates', '0 2 * * *', {
|
@ScheduledOperation('schedule-financials-updates', '0 2 * * *', {
|
||||||
priority: 6,
|
priority: 6,
|
||||||
immediately: false,
|
immediately: false,
|
||||||
|
|
@ -127,7 +127,7 @@ export class QMHandler extends BaseHandler<DataIngestionServices> {
|
||||||
@Operation('update-events')
|
@Operation('update-events')
|
||||||
updateEvents = updateEvents;
|
updateEvents = updateEvents;
|
||||||
|
|
||||||
// @Disabled()
|
@Disabled()
|
||||||
@ScheduledOperation('schedule-events-updates', '0 3 * * *', {
|
@ScheduledOperation('schedule-events-updates', '0 3 * * *', {
|
||||||
priority: 6,
|
priority: 6,
|
||||||
immediately: false,
|
immediately: false,
|
||||||
|
|
@ -155,7 +155,7 @@ export class QMHandler extends BaseHandler<DataIngestionServices> {
|
||||||
@Operation('update-prices')
|
@Operation('update-prices')
|
||||||
updatePrices = updatePrices;
|
updatePrices = updatePrices;
|
||||||
|
|
||||||
// @Disabled()
|
@Disabled()
|
||||||
@ScheduledOperation('schedule-price-updates', '0 */6 * * *', {
|
@ScheduledOperation('schedule-price-updates', '0 */6 * * *', {
|
||||||
priority: 8,
|
priority: 8,
|
||||||
immediately: false,
|
immediately: false,
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ export const QM_CONFIG = {
|
||||||
|
|
||||||
// Session management settings
|
// Session management settings
|
||||||
export const SESSION_CONFIG = {
|
export const SESSION_CONFIG = {
|
||||||
MAX_SESSIONS: 100,
|
MAX_SESSIONS: 5,
|
||||||
MAX_FAILED_CALLS: 5,
|
MAX_FAILED_CALLS: 5,
|
||||||
SESSION_TIMEOUT: 5000, // 10 seconds
|
SESSION_TIMEOUT: 5000, // 10 seconds
|
||||||
API_TIMEOUT: 30000, // 15 seconds
|
API_TIMEOUT: 30000, // 15 seconds
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,13 @@
|
||||||
import type { Logger, MongoDBClient } from '@stock-bot/types';
|
import type { Logger, MongoDBClient } from '@stock-bot/types';
|
||||||
import type { BaseOperationProvider } from './BaseOperationProvider';
|
import type { BaseOperationProvider } from './BaseOperationProvider';
|
||||||
import type {
|
import type {
|
||||||
|
BulkOperationUpdate,
|
||||||
OperationComponentOptions,
|
OperationComponentOptions,
|
||||||
|
OperationConfig,
|
||||||
|
OperationStats,
|
||||||
OperationUpdate,
|
OperationUpdate,
|
||||||
StaleSymbolOptions,
|
StaleSymbolOptions,
|
||||||
BulkOperationUpdate,
|
SymbolWithOperations
|
||||||
OperationStats,
|
|
||||||
SymbolWithOperations,
|
|
||||||
OperationConfig
|
|
||||||
} from './types';
|
} from './types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -197,7 +197,7 @@ export class OperationTracker {
|
||||||
* Bulk update symbol operations for performance
|
* Bulk update symbol operations for performance
|
||||||
*/
|
*/
|
||||||
async bulkUpdateSymbolOperations(updates: BulkOperationUpdate[]): Promise<void> {
|
async bulkUpdateSymbolOperations(updates: BulkOperationUpdate[]): Promise<void> {
|
||||||
if (updates.length === 0) return;
|
if (updates.length === 0) {return;}
|
||||||
|
|
||||||
const { collectionName, symbolField, name: providerName } = this.provider.getProviderConfig();
|
const { collectionName, symbolField, name: providerName } = this.provider.getProviderConfig();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue