work on getting close to refactor
This commit is contained in:
parent
8550b1de57
commit
a63ccc96f5
15 changed files with 129 additions and 178 deletions
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue