format
This commit is contained in:
parent
d858222af7
commit
7d9044ab29
202 changed files with 10755 additions and 10972 deletions
|
|
@ -1,8 +1,4 @@
|
|||
import {
|
||||
BaseHandler,
|
||||
Handler,
|
||||
type IServiceContainer
|
||||
} from '@stock-bot/handlers';
|
||||
import { BaseHandler, Handler, type IServiceContainer } from '@stock-bot/handlers';
|
||||
|
||||
@Handler('qm')
|
||||
export class QMHandler extends BaseHandler {
|
||||
|
|
@ -11,10 +7,10 @@ export class QMHandler extends BaseHandler {
|
|||
}
|
||||
|
||||
// @Operation('check-sessions')
|
||||
// @QueueSchedule('0 */15 * * *', {
|
||||
// priority: 7,
|
||||
// immediately: true,
|
||||
// description: 'Check and maintain QM 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
|
||||
|
|
@ -36,13 +32,13 @@ export class QMHandler extends BaseHandler {
|
|||
// // Check existing symbols in MongoDB
|
||||
// const symbolsCollection = this.mongodb.collection('qm_symbols');
|
||||
// const symbols = await symbolsCollection.find({}).limit(100).toArray();
|
||||
|
||||
|
||||
// this.logger.info('QM symbol search completed', { count: symbols.length });
|
||||
|
||||
|
||||
// if (symbols && symbols.length > 0) {
|
||||
// // Cache result for performance
|
||||
// await this.cache.set('qm-symbols-sample', symbols.slice(0, 10), 1800);
|
||||
|
||||
|
||||
// return {
|
||||
// success: true,
|
||||
// message: 'QM symbol search completed successfully',
|
||||
|
|
@ -58,7 +54,7 @@ export class QMHandler extends BaseHandler {
|
|||
// count: 0,
|
||||
// };
|
||||
// }
|
||||
|
||||
|
||||
// } catch (error) {
|
||||
// this.logger.error('Failed to search QM symbols', { error });
|
||||
// throw error;
|
||||
|
|
@ -66,10 +62,10 @@ export class QMHandler extends BaseHandler {
|
|||
// }
|
||||
|
||||
// @Operation('spider-symbol-search')
|
||||
// @QueueSchedule('0 0 * * 0', {
|
||||
// priority: 10,
|
||||
// immediately: false,
|
||||
// description: 'Comprehensive symbol search using QM API'
|
||||
// @QueueSchedule('0 0 * * 0', {
|
||||
// priority: 10,
|
||||
// immediately: false,
|
||||
// description: 'Comprehensive symbol search using QM API'
|
||||
// })
|
||||
// async spiderSymbolSearch(payload: SymbolSpiderJob | undefined, context: ExecutionContext): Promise<unknown> {
|
||||
// // Set default payload for scheduled runs
|
||||
|
|
@ -79,9 +75,9 @@ export class QMHandler extends BaseHandler {
|
|||
// source: 'qm',
|
||||
// maxDepth: 4
|
||||
// };
|
||||
|
||||
|
||||
// this.logger.info('Starting QM spider symbol search', { payload: jobPayload });
|
||||
|
||||
|
||||
// // Store spider job info in cache (temporary data)
|
||||
// const spiderJobId = `spider:qm:${Date.now()}:${Math.random().toString(36).substr(2, 9)}`;
|
||||
// const spiderResult = {
|
||||
|
|
@ -90,19 +86,18 @@ export class QMHandler extends BaseHandler {
|
|||
// status: 'started',
|
||||
// jobId: spiderJobId
|
||||
// };
|
||||
|
||||
|
||||
// // Store in cache with 1 hour TTL (temporary data)
|
||||
// await this.cache.set(spiderJobId, spiderResult, 3600);
|
||||
// this.logger.debug('Spider job stored in cache', { spiderJobId, ttl: 3600 });
|
||||
|
||||
|
||||
// // Schedule follow-up processing if needed
|
||||
// await this.scheduleOperation('search-symbols', { source: 'spider', spiderJobId }, 5000);
|
||||
|
||||
// return {
|
||||
// success: true,
|
||||
|
||||
// return {
|
||||
// success: true,
|
||||
// message: 'QM spider search initiated',
|
||||
// spiderJobId
|
||||
// };
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue