From 721ddb0a22bbfc8151b45016d22b34070ae1024b Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 29 Nov 2025 09:30:13 +0100 Subject: [PATCH] Refactoring --- .../data-gathering/data-gathering.service.ts | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/apps/api/src/services/queues/data-gathering/data-gathering.service.ts b/apps/api/src/services/queues/data-gathering/data-gathering.service.ts index c433f692f..f82325f0c 100644 --- a/apps/api/src/services/queues/data-gathering/data-gathering.service.ts +++ b/apps/api/src/services/queues/data-gathering/data-gathering.service.ts @@ -307,23 +307,19 @@ export class DataGatheringService { const symbolProfiles = await this.prismaService.symbolProfile.findMany({ orderBy: [{ symbol: 'asc' }], where: { + dataSource: { + notIn: ['MANUAL', 'RAPID_API'] + }, isActive: true } }); - return symbolProfiles - .filter(({ dataSource }) => { - return ( - dataSource !== DataSource.MANUAL && - dataSource !== DataSource.RAPID_API - ); - }) - .map(({ dataSource, symbol }) => { - return { - dataSource, - symbol - }; - }); + return symbolProfiles.map(({ dataSource, symbol }) => { + return { + dataSource, + symbol + }; + }); } private async getAssetProfileIdentifiersWithCompleteMarketData(): Promise<