initial setup with operation tracker
This commit is contained in:
parent
d52cfe7de2
commit
736b86e66a
5 changed files with 92 additions and 89 deletions
|
|
@ -5,11 +5,13 @@ import {
|
|||
ScheduledOperation,
|
||||
} from '@stock-bot/handlers';
|
||||
import { checkSessions, createSession, searchSymbols, spiderSymbol } from './actions';
|
||||
import { updatePrices, updateIntradayBars, getOperationStats } from './actions/price.action';
|
||||
import { getOperationStats } from './actions/price.action';
|
||||
import { initializeQMOperations } from './shared/operation-registry';
|
||||
|
||||
@Handler('qm')
|
||||
export class QMHandler extends BaseHandler {
|
||||
constructor(services: any) {
|
||||
initializeQMOperations(services.mongodb, services.logger);
|
||||
super(services); // Handler name read from @Handler decorator
|
||||
}
|
||||
|
||||
|
|
@ -39,22 +41,22 @@ export class QMHandler extends BaseHandler {
|
|||
@Operation('search-symbols')
|
||||
searchSymbols = searchSymbols;
|
||||
|
||||
/**
|
||||
* PRICE DATA
|
||||
*/
|
||||
@ScheduledOperation('update-prices', '0 */6 * * *', {
|
||||
priority: 5,
|
||||
immediately: false,
|
||||
description: 'Update daily prices every 6 hours'
|
||||
})
|
||||
updatePrices = updatePrices;
|
||||
// /**
|
||||
// * PRICE DATA
|
||||
// */
|
||||
// @ScheduledOperation('update-prices', '0 */6 * * *', {
|
||||
// priority: 5,
|
||||
// immediately: false,
|
||||
// description: 'Update daily prices every 6 hours'
|
||||
// })
|
||||
// updatePrices = updatePrices;
|
||||
|
||||
@ScheduledOperation('update-intraday-bars', '*/30 * * * *', {
|
||||
priority: 6,
|
||||
immediately: false,
|
||||
description: 'Update intraday bars every 30 minutes during market hours'
|
||||
})
|
||||
updateIntradayBars = updateIntradayBars;
|
||||
// @ScheduledOperation('update-intraday-bars', '*/30 * * * *', {
|
||||
// priority: 6,
|
||||
// immediately: false,
|
||||
// description: 'Update intraday bars every 30 minutes during market hours'
|
||||
// })
|
||||
// updateIntradayBars = updateIntradayBars;
|
||||
|
||||
/**
|
||||
* MONITORING
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue