feat: register ScheduleModule and CleanupService in AppModule
This commit is contained in:
parent
363982e0d3
commit
16bcfb5cd5
1 changed files with 8 additions and 8 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import { Module } from @nestjs/common;
|
||||
import { ConfigModule } from @nestjs/config;
|
||||
import { ScheduleModule } from @nestjs/schedule;
|
||||
import { BullModule } from @nestjs/bullmq;
|
||||
import { LoggerModule } from nestjs-pino;
|
||||
import { ExampleProcessor } from ./queue/example.processor;
|
||||
import { CleanupService } from ./cleanup/cleanup.service;
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { ScheduleModule } from '@nestjs/schedule';
|
||||
import { BullModule } from '@nestjs/bullmq';
|
||||
import { LoggerModule } from 'nestjs-pino';
|
||||
import { ExampleProcessor } from './queue/example.processor';
|
||||
import { CleanupService } from './cleanup/cleanup.service';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
|
|
@ -12,7 +12,7 @@ import { CleanupService } from ./cleanup/cleanup.service;
|
|||
LoggerModule.forRoot(),
|
||||
ScheduleModule.forRoot(),
|
||||
BullModule.forRoot({ connection: { url: process.env.REDIS_URL } }),
|
||||
BullModule.registerQueue({ name: example }),
|
||||
BullModule.registerQueue({ name: 'example' }),
|
||||
],
|
||||
providers: [ExampleProcessor, CleanupService],
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue