Browse Source

Restrict historical market data gathering to active asset profiles

pull/4483/head
Thomas Kaul 3 weeks ago
parent
commit
fa5a234194
  1. 8
      apps/api/src/services/queues/data-gathering/data-gathering.service.ts
  2. 3
      apps/api/src/services/symbol-profile/symbol-profile.service.ts

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

@ -300,7 +300,10 @@ export class DataGatheringService {
AssetProfileIdentifier[]
> {
const symbolProfiles = await this.prismaService.symbolProfile.findMany({
orderBy: [{ symbol: 'asc' }]
orderBy: [{ symbol: 'asc' }],
where: {
isActive: true
}
});
return symbolProfiles
@ -436,6 +439,9 @@ export class DataGatheringService {
},
scraperConfiguration: true,
symbol: true
},
where: {
isActive: true
}
})
)

3
apps/api/src/services/symbol-profile/symbol-profile.service.ts

@ -106,6 +106,7 @@ export class SymbolProfileService {
},
orderBy: [{ symbol: 'asc' }],
where: {
isActive: true,
Order: withUserSubscription
? {
some: {
@ -133,6 +134,7 @@ export class SymbolProfileService {
currency,
dataSource,
holdings,
isActive,
name,
scraperConfiguration,
sectors,
@ -149,6 +151,7 @@ export class SymbolProfileService {
countries,
currency,
holdings,
isActive,
name,
scraperConfiguration,
sectors,

Loading…
Cancel
Save