2026-01-25 16:01:09 -08:00
|
|
|
import { Module } from '@nestjs/common';
|
|
|
|
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
|
|
|
import { BullModule } from '@nestjs/bullmq';
|
2026-06-21 07:48:02 -05:00
|
|
|
import { EVENTS_QUEUE } from '@lilith/analytics';
|
2026-01-25 16:01:09 -08:00
|
|
|
import { EventsProcessor } from './events.processor';
|
|
|
|
|
import { AggregationService } from './aggregation.service';
|
|
|
|
|
import { AggregatedMetric } from '../entities/aggregated-metric.entity';
|
2026-04-04 23:57:42 -07:00
|
|
|
import { RawEvent } from '../entities/raw-event.entity';
|
2026-01-29 08:20:57 -08:00
|
|
|
import { RedisModule } from '../redis/redis.module';
|
2026-06-21 07:48:02 -05:00
|
|
|
import { IngestModule } from '../ingest/ingest.module';
|
2026-01-25 16:01:09 -08:00
|
|
|
|
|
|
|
|
@Module({
|
|
|
|
|
imports: [
|
2026-04-04 23:57:42 -07:00
|
|
|
TypeOrmModule.forFeature([AggregatedMetric, RawEvent]),
|
2026-01-25 16:01:09 -08:00
|
|
|
BullModule.registerQueue({
|
2026-06-21 07:48:02 -05:00
|
|
|
name: EVENTS_QUEUE,
|
2026-01-25 16:01:09 -08:00
|
|
|
}),
|
2026-01-29 08:20:57 -08:00
|
|
|
RedisModule,
|
2026-06-21 07:48:02 -05:00
|
|
|
IngestModule,
|
2026-01-25 16:01:09 -08:00
|
|
|
],
|
|
|
|
|
providers: [EventsProcessor, AggregationService],
|
|
|
|
|
exports: [AggregationService],
|
|
|
|
|
})
|
|
|
|
|
export class ProcessorsModule {}
|