Skip to content

Commit b81d297

Browse files
docs: minor wording tweaks
1 parent 68b0560 commit b81d297

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

content/techniques/queues.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -468,16 +468,17 @@ BullModule.registerQueueAsync({
468468

469469
#### Manual registration
470470

471-
By default, `BullModule` is automatically registring BullMQ components (queues processors and event listeners services) in an `onModuleInit` life-cycle function. In some use cases this behavior isn't ideal, so to prevent this you should enable `manualRegistration` in `BullModule` as such:
471+
By default, `BullModule` automatically registers BullMQ components (queues, processors, and event listener services) in the `onModuleInit` lifecycle function. However, in some cases, this behavior may not be ideal. To prevent automatic registration, enable `manualRegistration` in `BullModule` like this:
472472

473473
```typescript
474474
BullModule.forRoot({
475475
extraOptions: {
476476
manualRegistration: true,
477-
},});
477+
},
478+
});
478479
```
479480

480-
In order to regiter those components you should inject `BullRegistrar` and call the `register` function (ideally in an `OnModuleInit` or `OnApplicationBoostrap`).
481+
To register these components manually, inject `BullRegistrar` and call the `register` function, ideally within `OnModuleInit` or `OnApplicationBootstrap`.
481482

482483
```typescript
483484
import { Injectable, OnModuleInit } from '@nestjs/common';
@@ -488,14 +489,14 @@ export class AudioService implements OnModuleInit {
488489
constructor(private bullRegistrar: BullRegistrar) {}
489490

490491
onModuleInit() {
491-
if (something) {
492+
if (yourConditionHere) {
492493
this.bullRegistrar.register();
493494
}
494495
}
495496
}
496-
```
497+
```
497498

498-
Unless you're calling the `BullRegistrar#register` function no BullMQ component will work (e.g no job will be processed).
499+
Unless you call the `BullRegistrar#register` function, no BullMQ components will work—meaning no jobs will be processed.
499500

500501
#### Bull installation
501502

0 commit comments

Comments
 (0)