2021-08-14 16:55:40 +02:00
|
|
|
import { ConfigurationModule } from '@ghostfolio/api/services/configuration.module';
|
|
|
|
import { DataGatheringService } from '@ghostfolio/api/services/data-gathering.service';
|
2021-10-24 10:49:17 +02:00
|
|
|
import { DataEnhancerModule } from '@ghostfolio/api/services/data-provider/data-enhancer/data-enhancer.module';
|
2021-08-14 16:55:40 +02:00
|
|
|
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module';
|
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma.module';
|
2022-05-07 20:00:51 +02:00
|
|
|
import { DATA_GATHERING_QUEUE } from '@ghostfolio/common/config';
|
|
|
|
import { BullModule } from '@nestjs/bull';
|
2021-08-14 16:55:40 +02:00
|
|
|
import { Module } from '@nestjs/common';
|
2022-06-11 13:40:15 +02:00
|
|
|
import ms from 'ms';
|
2021-08-14 16:55:40 +02:00
|
|
|
|
2022-05-07 20:00:51 +02:00
|
|
|
import { DataGatheringProcessor } from './data-gathering.processor';
|
2021-09-24 21:09:48 +02:00
|
|
|
import { ExchangeRateDataModule } from './exchange-rate-data.module';
|
2022-06-25 11:15:01 +02:00
|
|
|
import { MarketDataModule } from './market-data.module';
|
2021-11-07 09:42:36 +01:00
|
|
|
import { SymbolProfileModule } from './symbol-profile.module';
|
2021-09-24 21:09:48 +02:00
|
|
|
|
2021-08-14 16:55:40 +02:00
|
|
|
@Module({
|
2021-09-24 21:09:48 +02:00
|
|
|
imports: [
|
2022-05-07 20:00:51 +02:00
|
|
|
BullModule.registerQueue({
|
2022-06-11 13:40:15 +02:00
|
|
|
limiter: {
|
|
|
|
duration: ms('5 seconds'),
|
|
|
|
max: 1
|
|
|
|
},
|
2022-05-07 20:00:51 +02:00
|
|
|
name: DATA_GATHERING_QUEUE
|
|
|
|
}),
|
2021-09-24 21:09:48 +02:00
|
|
|
ConfigurationModule,
|
2021-10-24 10:49:17 +02:00
|
|
|
DataEnhancerModule,
|
2021-09-24 21:09:48 +02:00
|
|
|
DataProviderModule,
|
|
|
|
ExchangeRateDataModule,
|
2022-06-25 11:15:01 +02:00
|
|
|
MarketDataModule,
|
2021-11-07 09:42:36 +01:00
|
|
|
PrismaModule,
|
|
|
|
SymbolProfileModule
|
2021-09-24 21:09:48 +02:00
|
|
|
],
|
2022-05-07 20:00:51 +02:00
|
|
|
providers: [DataGatheringProcessor, DataGatheringService],
|
|
|
|
exports: [BullModule, DataEnhancerModule, DataGatheringService]
|
2021-08-14 16:55:40 +02:00
|
|
|
})
|
|
|
|
export class DataGatheringModule {}
|