forked from StellarSplit/StellarSplit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebhooks.module.ts
More file actions
31 lines (30 loc) · 1.01 KB
/
Copy pathwebhooks.module.ts
File metadata and controls
31 lines (30 loc) · 1.01 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 { BullModule } from '@nestjs/bull';
import { WebhooksController } from './webhooks.controller';
import { WebhooksService } from './webhooks.service';
import { WebhookDeliveryService } from './webhook-delivery.service';
import { WebhookProcessor } from './webhook.processor';
import { Webhook } from './webhook.entity';
import { WebhookDelivery } from './webhook-delivery.entity';
@Module({
imports: [
TypeOrmModule.forFeature([Webhook, WebhookDelivery]),
BullModule.registerQueue({
name: 'webhook_queue',
defaultJobOptions: {
attempts: 3,
backoff: {
type: 'exponential',
delay: 1000,
},
removeOnComplete: true,
removeOnFail: false,
},
}),
],
controllers: [WebhooksController],
providers: [WebhooksService, WebhookDeliveryService, WebhookProcessor],
exports: [WebhooksService, WebhookDeliveryService],
})
export class WebhooksModule {}