Browse Source

remove unnessesary comments

pull/5858/head
Sven Günther 3 days ago
parent
commit
9e4df2573b
  1. 2
      apps/api/src/services/market-data/market-data.service.ts
  2. 2
      apps/api/src/services/queues/data-gathering/data-gathering.processor.ts
  3. 2
      apps/api/src/services/queues/data-gathering/data-gathering.service.ts

2
apps/api/src/services/market-data/market-data.service.ts

@ -221,7 +221,6 @@ export class MarketDataService {
data: Prisma.MarketDataUpdateInput[];
}): Promise<void> {
await this.prismaService.$transaction(async (prisma) => {
// First, delete all existing market data for this symbol
await prisma.marketData.deleteMany({
where: {
dataSource,
@ -229,7 +228,6 @@ export class MarketDataService {
}
});
// Then, insert all new market data
const upsertPromises = data.map(
({ dataSource, date, marketPrice, state }) => {
return prisma.marketData.create({

2
apps/api/src/services/queues/data-gathering/data-gathering.processor.ts

@ -157,8 +157,6 @@ export class DataGatheringProcessor {
currentDate = addDays(currentDate, 1);
}
// If replaceExistingData is true, use atomic replace to prevent data loss
// on failure. Otherwise, use the normal upsert approach.
if (replaceExistingData) {
await this.marketDataService.replaceAllForSymbol({
dataSource,

2
apps/api/src/services/queues/data-gathering/data-gathering.service.ts

@ -105,8 +105,6 @@ export class DataGatheringService {
date: date ?? item.date
}));
// Add a flag to indicate this should replace all existing data
// The data will be deleted and replaced within a transaction in the processor
await this.gatherSymbols({
dataGatheringItems,
priority: DATA_GATHERING_QUEUE_PRIORITY_HIGH,

Loading…
Cancel
Save