work on getting close to refactor

This commit is contained in:
Boki 2025-06-22 11:08:26 -04:00
parent 8550b1de57
commit a63ccc96f5
15 changed files with 129 additions and 178 deletions

View file

@ -1,9 +1,6 @@
import {
BaseHandler,
Handler,
Operation,
QueueSchedule,
type ExecutionContext,
type IServiceContainer
} from '@stock-bot/handlers';
@ -13,24 +10,24 @@ export class QMHandler extends BaseHandler {
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);
}
// @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);
// }
@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')
// 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('search-symbols')
// async searchSymbols(_input: unknown, _context: ExecutionContext): Promise<unknown> {