fixed proxy started working on new qm

This commit is contained in:
Boki 2025-06-26 21:47:27 -04:00
parent d989c0c814
commit e5f505335c
12 changed files with 375 additions and 115 deletions

View file

@ -1,29 +1,26 @@
import { BaseHandler, Handler, type IServiceContainer } from '@stock-bot/handlers';
import {
BaseHandler,
Handler,
Operation,
ScheduledOperation,
} from '@stock-bot/handlers';
import { checkSessions, createSession } from './actions';
@Handler('qm')
export class QMHandler extends BaseHandler {
constructor(services: IServiceContainer) {
constructor(services: any) {
super(services); // Handler name read from @Handler decorator
}
// @Operation('check-sessions')
// @QueueSchedule('0 */15 * * *', {
// priority: 7,
// immediately: true,
// description: 'Check and maintain QM sessions'
// })
// async checkSessions(input: unknown, context: ExecutionContext): Promise<unknown> {
// // Call the session maintenance action
// const { checkSessions } = await import('./actions/session.action');
// return await checkSessions(this);
// }
@ScheduledOperation('check-sessions', '*/2 * * * *', {
priority: 8,
immediately: true,
description: 'Check and maintain QM sessions every 2 minutes',
})
checkSessions = checkSessions;
// @Operation('create-session')
// async createSession(input: unknown, context: ExecutionContext): Promise<unknown> {
// // Call the individual session creation action
// const { createSingleSession } = await import('./actions/session.action');
// return await createSingleSession(this, input);
// }
@Operation('create-session')
createSession = createSession;
// @Operation('search-symbols')
// async searchSymbols(_input: unknown, _context: ExecutionContext): Promise<unknown> {