Skip to content

Commit

Permalink
GITBOOK-189: change request with no subject merged in GitBook
Browse files Browse the repository at this point in the history
  • Loading branch information
manast authored and gitbook-bot committed Feb 20, 2024
1 parent 571b417 commit 56e578b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/gitbook/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
* [Max group size](bullmq-pro/groups/max-group-size.md)
* [Pausing groups](bullmq-pro/groups/pausing-groups.md)
* [Prioritized intra-groups](bullmq-pro/groups/prioritized.md)
* [Sandboxes for groups](bullmq-pro/groups/sandboxes-for-groups.md)
* [Batches](bullmq-pro/batches.md)
* [NestJs](bullmq-pro/nestjs/README.md)
* [Producers](bullmq-pro/nestjs/producers.md)
Expand Down
13 changes: 13 additions & 0 deletions docs/gitbook/bullmq-pro/groups/sandboxes-for-groups.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Sandboxes for groups

It is also possible to use [Sandboxes](../../guide/workers/sandboxed-processors.md) for processing groups. It works essentially the same as in standard BullMQ, but you gain access to the "gid" property in the job object sent to your processor, for example:

```typescript
module.exports = function (job: SandboxedJobPro) {
expect(job).to.have.property('gid');
expect(job.opts).to.have.property('group');
expect(job.opts.group).to.have.property('id');
expect(job.opts.group.id).to.be.a('string');
expect(job.opts.group.id).to.equal(job.gid);
};
```

0 comments on commit 56e578b

Please sign in to comment.