-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate from bull -> BullMQ update all local jobs to support BullMQ update Redis configuration to work with new BullMQ
- Loading branch information
Showing
17 changed files
with
284 additions
and
312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
import { CONFIG_TOKEN } from '@app/common/config/config.module'; | ||
import { | ||
BullModuleOptions, | ||
SharedBullConfigurationFactory, | ||
} from '@nestjs/bull'; | ||
import { SharedBullConfigurationFactory } from '@nestjs/bullmq'; | ||
import { Inject, Injectable } from '@nestjs/common'; | ||
import { IConfig } from 'config'; | ||
import { QueueOptions } from 'bullmq'; | ||
import { | ||
CONFIG_TOKEN, | ||
IConfig, | ||
} from '../../../../libs/common/src/config/config.module'; | ||
|
||
@Injectable() | ||
export class BullConfigService implements SharedBullConfigurationFactory { | ||
constructor(@Inject(CONFIG_TOKEN) private config: IConfig) {} | ||
|
||
createSharedConfiguration(): BullModuleOptions { | ||
createSharedConfiguration(): QueueOptions { | ||
return { | ||
url: this.config.get<string>('REDIS.URL'), | ||
connection: { | ||
host: this.config.get<string>('REDIS.HOST'), | ||
port: this.config.get<number>('REDIS.PORT'), | ||
password: this.config.get<string>('REDIS.PASSWORD'), | ||
}, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.