31 lines
No EOL
814 B
TypeScript
31 lines
No EOL
814 B
TypeScript
import {
|
|
BaseHandler,
|
|
Disabled,
|
|
Handler,
|
|
ScheduledOperation
|
|
} from '@stock-bot/handlers';
|
|
import type { DataIngestionServices } from '../../types';
|
|
import { fetchCountries, spiderUrl } from './actions';
|
|
|
|
@Handler('te')
|
|
// @Disabled()
|
|
export class TeHandler extends BaseHandler<DataIngestionServices> {
|
|
constructor(services: any) {
|
|
super(services);
|
|
}
|
|
|
|
@ScheduledOperation('te-countries', '0 0 * * 0', {
|
|
priority: 5,
|
|
description: 'Fetch and update Trading Economics countries data',
|
|
immediately: true,
|
|
})
|
|
@Disabled()
|
|
fetchCountries = fetchCountries;
|
|
|
|
@ScheduledOperation('te-spider', '0 0 * * 0', {
|
|
priority: 5,
|
|
description: 'Fetch and update Trading Economics countries data',
|
|
immediately: true,
|
|
})
|
|
spiderUrlSchedule = spiderUrl;
|
|
} |