forked from StellarSplit/StellarSplit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush-notifications.module.ts
More file actions
31 lines (30 loc) · 1.11 KB
/
Copy pathpush-notifications.module.ts
File metadata and controls
31 lines (30 loc) · 1.11 KB
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
31
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { ScheduleModule } from '@nestjs/schedule';
import { BullModule } from '@nestjs/bull';
import { PushNotificationsService } from './push-notifications.service';
import { PushNotificationsController } from './push-notifications.controller';
import { PushNotificationProcessor } from './push-notifications.processor';
import { DeviceRegistration } from './entities/device-registration.entity';
import { NotificationPreference } from './entities/notification-preference.entity';
@Module({
imports: [
TypeOrmModule.forFeature([DeviceRegistration, NotificationPreference]),
ScheduleModule.forRoot(),
BullModule.registerQueue({
name: 'push_queue',
defaultJobOptions: {
attempts: 3,
backoff: {
type: 'exponential',
delay: 1000,
},
removeOnComplete: true,
},
}),
],
controllers: [PushNotificationsController],
providers: [PushNotificationsService, PushNotificationProcessor],
exports: [PushNotificationsService],
})
export class PushNotificationsModule {}