changed up operationTracker and added eodSearchCode
This commit is contained in:
parent
18289f0a04
commit
7486a1fa65
11 changed files with 237 additions and 143 deletions
|
|
@ -157,7 +157,8 @@ export async function fetchPrices(
|
|||
);
|
||||
|
||||
// Update operation tracker instead of directly updating the symbol
|
||||
await this.operationRegistry.updateOperation('eod', symbol, 'price_update', {
|
||||
const eodSearchCode = `${symbol}.${exchange}`;
|
||||
await this.operationRegistry.updateOperation('eod', eodSearchCode, 'price_update', {
|
||||
status: 'success',
|
||||
lastRecordDate: priceData.length > 0 ? priceData[priceData.length - 1].date : null,
|
||||
recordCount: priceData.length,
|
||||
|
|
@ -177,7 +178,8 @@ export async function fetchPrices(
|
|||
logger.error('Failed to fetch or save prices', { error, symbol, exchange });
|
||||
|
||||
// Update operation tracker with failure
|
||||
await this.operationRegistry.updateOperation('eod', symbol, 'price_update', {
|
||||
const eodSearchCode = `${symbol}.${exchange}`;
|
||||
await this.operationRegistry.updateOperation('eod', eodSearchCode, 'price_update', {
|
||||
status: 'failure',
|
||||
error: error.message
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue