import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { BullModule } from '@nestjs/bullmq'; import { EVENTS_QUEUE } from '@lilith/analytics'; import { EventsProcessor } from './events.processor'; import { AggregationService } from './aggregation.service'; import { AggregatedMetric } from '../entities/aggregated-metric.entity'; import { RawEvent } from '../entities/raw-event.entity'; import { RedisModule } from '../redis/redis.module'; import { IngestModule } from '../ingest/ingest.module'; @Module({ imports: [ TypeOrmModule.forFeature([AggregatedMetric, RawEvent]), BullModule.registerQueue({ name: EVENTS_QUEUE, }), RedisModule, IngestModule, ], providers: [EventsProcessor, AggregationService], exports: [AggregationService], }) export class ProcessorsModule {}