Refactor QueueModule to use PAYMENT_QUEUE constant and update Redis connection settings
This commit is contained in:
parent
f692877e07
commit
1116181d8c
@ -1,19 +1,22 @@
|
|||||||
import { Module } from '@nestjs/common';
|
import { Module } from '@nestjs/common';
|
||||||
import { BullModule } from '@nestjs/bullmq';
|
import { BullModule } from '@nestjs/bullmq';
|
||||||
|
import { QueueService } from './queue.service';
|
||||||
|
import { PAYMENT_QUEUE } from './constants/queue.constants';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
BullModule.forRoot({
|
BullModule.forRoot({
|
||||||
connection: {
|
connection: {
|
||||||
host: '192.168.1.112',
|
host: 'redis',
|
||||||
port: 6379,
|
port: 6379,
|
||||||
username: 'default',
|
|
||||||
password: '7TfhqvHPe98AQq123',
|
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
BullModule.registerQueue({
|
||||||
|
name: PAYMENT_QUEUE,
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
controllers: [],
|
controllers: [],
|
||||||
providers: [],
|
providers: [QueueService],
|
||||||
exports: [],
|
exports: [QueueService],
|
||||||
})
|
})
|
||||||
export class QueueModule {}
|
export class QueueModule {}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user