Skip to content

Instantly share code, notes, and snippets.

@tranphuoctien
Created March 31, 2022 03:11
Show Gist options
  • Save tranphuoctien/b33b2cbb02b3b4a5bf123b006b7a4c23 to your computer and use it in GitHub Desktop.
Save tranphuoctien/b33b2cbb02b3b4a5bf123b006b7a4c23 to your computer and use it in GitHub Desktop.
Bull queue on nestjs
BullModule.forRootAsync({
inject: [ConfigService],
useFactory: async (configService: ConfigService) => ({
prefix: configService.get('APP_ENV') || 'dev',
redis: {
role: 'master',
name: configService.get('REDIS_SENTINEL_NAME') || 'mymaster',
sentinels: [
{
host: configService.get('REDIS_HOST'),
port: configService.get('REDIS_PORT'),
},
],
},
}),
}),
@tranphuoctien
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment