switched eod to new exchange way
This commit is contained in:
parent
f4366f7289
commit
7a99d08d04
7 changed files with 11 additions and 12 deletions
|
|
@ -59,7 +59,7 @@ export async function scheduleFetchCorporateActions(
|
||||||
// Schedule dividends fetch
|
// Schedule dividends fetch
|
||||||
await this.scheduleOperation('fetch-corporate-actions', {
|
await this.scheduleOperation('fetch-corporate-actions', {
|
||||||
symbol: symbol.Code,
|
symbol: symbol.Code,
|
||||||
exchange: symbol.Exchange,
|
exchange: symbol.eodExchange || symbol.Exchange, // Use eodExchange if available
|
||||||
actionType: 'dividends',
|
actionType: 'dividends',
|
||||||
country: symbol.Country
|
country: symbol.Country
|
||||||
}, {
|
}, {
|
||||||
|
|
@ -75,7 +75,7 @@ export async function scheduleFetchCorporateActions(
|
||||||
// Schedule splits fetch
|
// Schedule splits fetch
|
||||||
await this.scheduleOperation('fetch-corporate-actions', {
|
await this.scheduleOperation('fetch-corporate-actions', {
|
||||||
symbol: symbol.Code,
|
symbol: symbol.Code,
|
||||||
exchange: symbol.Exchange,
|
exchange: symbol.eodExchange || symbol.Exchange, // Use eodExchange if available
|
||||||
actionType: 'splits',
|
actionType: 'splits',
|
||||||
country: symbol.Country
|
country: symbol.Country
|
||||||
}, {
|
}, {
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ export async function scheduleFetchFundamentals(
|
||||||
const etf = etfs[i];
|
const etf = etfs[i];
|
||||||
await this.scheduleOperation('fetch-single-fundamentals', {
|
await this.scheduleOperation('fetch-single-fundamentals', {
|
||||||
symbol: etf.Code,
|
symbol: etf.Code,
|
||||||
exchange: etf.Exchange,
|
exchange: etf.eodExchange || etf.Exchange, // Use eodExchange if available
|
||||||
country: etf.Country
|
country: etf.Country
|
||||||
}, {
|
}, {
|
||||||
attempts: 3,
|
attempts: 3,
|
||||||
|
|
@ -96,7 +96,7 @@ export async function scheduleFetchFundamentals(
|
||||||
// Convert to array of {symbol, exchange, country} objects
|
// Convert to array of {symbol, exchange, country} objects
|
||||||
const symbolBatch = batch.map(s => ({
|
const symbolBatch = batch.map(s => ({
|
||||||
symbol: s.Code,
|
symbol: s.Code,
|
||||||
exchange: s.Exchange,
|
exchange: s.eodExchange || s.Exchange, // Use eodExchange if available
|
||||||
country: s.Country
|
country: s.Country
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ export async function scheduleIntradayCrawl(
|
||||||
|
|
||||||
await this.scheduleOperation('crawl-intraday', {
|
await this.scheduleOperation('crawl-intraday', {
|
||||||
symbol: symbol.Code,
|
symbol: symbol.Code,
|
||||||
exchange: symbol.Exchange,
|
exchange: symbol.eodExchange || symbol.Exchange, // Use eodExchange if available
|
||||||
interval,
|
interval,
|
||||||
country: symbol.Country
|
country: symbol.Country
|
||||||
}, {
|
}, {
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ export async function scheduleFetchPrices(
|
||||||
|
|
||||||
await this.scheduleOperation('fetch-prices', {
|
await this.scheduleOperation('fetch-prices', {
|
||||||
symbol: symbol.Code,
|
symbol: symbol.Code,
|
||||||
exchange: symbol.Exchange,
|
exchange: symbol.eodExchange || symbol.Exchange, // Use eodExchange if available
|
||||||
country: symbol.Country
|
country: symbol.Country
|
||||||
}, {
|
}, {
|
||||||
attempts: 3,
|
attempts: 3,
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,8 @@ export async function fetchSymbols(
|
||||||
// Add metadata to each symbol
|
// Add metadata to each symbol
|
||||||
const symbolsWithMetadata = symbols.map(symbol => ({
|
const symbolsWithMetadata = symbols.map(symbol => ({
|
||||||
...symbol,
|
...symbol,
|
||||||
Exchange: symbol.Exchange || exchangeCode, // Ensure Exchange is set
|
Exchange: symbol.Exchange || exchangeCode, // Keep the original exchange (might be wrong)
|
||||||
|
eodExchange: exchangeCode, // Store the correct exchange code used to fetch this symbol
|
||||||
delisted: delisted,
|
delisted: delisted,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import type { DataIngestionServices } from '../../types';
|
||||||
import { fetchCountries, spiderUrl } from './actions';
|
import { fetchCountries, spiderUrl } from './actions';
|
||||||
|
|
||||||
@Handler('te')
|
@Handler('te')
|
||||||
// @Disabled()
|
@Disabled()
|
||||||
export class TeHandler extends BaseHandler<DataIngestionServices> {
|
export class TeHandler extends BaseHandler<DataIngestionServices> {
|
||||||
constructor(services: any) {
|
constructor(services: any) {
|
||||||
super(services);
|
super(services);
|
||||||
|
|
@ -17,7 +17,7 @@ export class TeHandler extends BaseHandler<DataIngestionServices> {
|
||||||
@ScheduledOperation('te-countries', '0 0 * * 0', {
|
@ScheduledOperation('te-countries', '0 0 * * 0', {
|
||||||
priority: 5,
|
priority: 5,
|
||||||
description: 'Fetch and update Trading Economics countries data',
|
description: 'Fetch and update Trading Economics countries data',
|
||||||
immediately: true,
|
immediately: false,
|
||||||
})
|
})
|
||||||
@Disabled()
|
@Disabled()
|
||||||
fetchCountries = fetchCountries;
|
fetchCountries = fetchCountries;
|
||||||
|
|
@ -25,7 +25,7 @@ export class TeHandler extends BaseHandler<DataIngestionServices> {
|
||||||
@ScheduledOperation('te-spider', '0 0 * * 0', {
|
@ScheduledOperation('te-spider', '0 0 * * 0', {
|
||||||
priority: 5,
|
priority: 5,
|
||||||
description: 'Fetch and update Trading Economics countries data',
|
description: 'Fetch and update Trading Economics countries data',
|
||||||
immediately: true,
|
immediately: false,
|
||||||
})
|
})
|
||||||
spiderUrlSchedule = spiderUrl;
|
spiderUrlSchedule = spiderUrl;
|
||||||
}
|
}
|
||||||
|
|
@ -11,11 +11,9 @@ Data Ingestion
|
||||||
|
|
||||||
Servers
|
Servers
|
||||||
Proxmox
|
Proxmox
|
||||||
- move gitlab to router server
|
|
||||||
- set up monitoring solution
|
- set up monitoring solution
|
||||||
|
|
||||||
Truenas
|
Truenas
|
||||||
- switch truenas to RAIDz2
|
|
||||||
- set up frigate with coral
|
- set up frigate with coral
|
||||||
- set up minio
|
- set up minio
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue