forked from StellarSplit/StellarSplit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemail.module.ts
More file actions
30 lines (29 loc) · 858 Bytes
/
Copy pathemail.module.ts
File metadata and controls
30 lines (29 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { Module, Global } from "@nestjs/common";
import { BullModule } from "@nestjs/bull";
import { TypeOrmModule } from "@nestjs/typeorm";
import { ConfigModule, ConfigService } from "@nestjs/config";
import { EmailService } from "./email.service";
import { EmailProcessor } from "./email.processor";
import { EmailController } from "./email.controller";
import { User } from "../entities/user.entity";
@Global()
@Module({
imports: [
TypeOrmModule.forFeature([User]),
BullModule.registerQueue({
name: "email_queue",
defaultJobOptions: {
attempts: 3,
backoff: {
type: "exponential",
delay: 1000,
},
removeOnComplete: true,
},
}),
],
controllers: [EmailController],
providers: [EmailService, EmailProcessor],
exports: [EmailService],
})
export class EmailModule {}