Skip to content

Commit

Permalink
docs(api): add missing api references (#2623)
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf authored Jun 28, 2024
1 parent 75eb119 commit 3fd6bca
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
7 changes: 7 additions & 0 deletions docs/gitbook/bullmq-pro/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [7.9.2](https://github.com/taskforcesh/bullmq-pro/compare/v7.9.1...v7.9.2) (2024-06-28)


### Bug Fixes

* **groups:** promote maxed groups after decreasing active count ([#234](https://github.com/taskforcesh/bullmq-pro/issues/234)) ([545b6c2](https://github.com/taskforcesh/bullmq-pro/commit/545b6c28c9634d1603ff3d237f072736c2f2388b))

## [7.9.1](https://github.com/taskforcesh/bullmq-pro/compare/v7.9.0...v7.9.1) (2024-06-18)


Expand Down
4 changes: 4 additions & 0 deletions docs/gitbook/bullmq-pro/groups/rate-limiting.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@ const worker = new WorkerPro(
},
);
```

## Read more:

* 💡 [Rate Limit Group API Reference](https://api.bullmq.pro/classes/v7.Worker.html#rateLimitGroup)
4 changes: 4 additions & 0 deletions docs/gitbook/guide/jobs/fifo.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ const queue = new Queue('Paint', { defaultJobOptions: {
removeOnComplete: true, removeOnFail: 1000
});
```
## Read more:
* 💡 [Add Job API Reference](https://api.docs.bullmq.io/classes/v5.Queue.html#add)
4 changes: 2 additions & 2 deletions src/classes/scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -853,12 +853,12 @@ export class Scripts {
jobId: string,
token: string,
opts?: MoveToWaitingChildrenOpts,
): string[] {
): (string | number)[] {
const timestamp = Date.now();

const childKey = getParentKey(opts.child);

const keys = [
const keys: (string | number)[] = [
`${jobId}:lock`,
'active',
'waiting-children',
Expand Down
9 changes: 8 additions & 1 deletion tests/test_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1630,9 +1630,14 @@ describe('workers', function () {
};
});

const worker = new Worker(queueName, processor, { connection, prefix });
const worker = new Worker(queueName, processor, {
connection,
autorun: false,
prefix,
});
await worker.waitUntilReady();

worker.run();
await processing;

await worker.close();
Expand Down Expand Up @@ -2164,6 +2169,7 @@ describe('workers', function () {
processing = false;
},
{
autorun: false,
connection,
prefix,
concurrency: 1,
Expand All @@ -2174,6 +2180,7 @@ describe('workers', function () {
await queue.add('test', {});
await queue.add('test', {});

worker.run();
await new Promise(resolve => {
worker.on('completed', after(2, resolve));
});
Expand Down

0 comments on commit 3fd6bca

Please sign in to comment.