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
24 lines (23 loc) · 1.06 KB
/
Copy pathpush-notifications.module.ts
File metadata and controls
24 lines (23 loc) · 1.06 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
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';
import { QueueJobPolicy, JobPolicyTier } from '../common/queue-job-policy';
@Module({
imports: [
TypeOrmModule.forFeature([DeviceRegistration, NotificationPreference]),
ScheduleModule.forRoot(),
BullModule.registerQueue(
QueueJobPolicy.forQueue('push_queue', JobPolicyTier.BEST_EFFORT),
),
],
controllers: [PushNotificationsController],
providers: [PushNotificationsService, PushNotificationProcessor],
exports: [PushNotificationsService],
})
export class PushNotificationsModule {}