Skip to content

Commit 56e578b

Browse files
manastgitbook-bot
authored andcommittedFeb 20, 2024··
GITBOOK-189: change request with no subject merged in GitBook
1 parent 571b417 commit 56e578b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
 

‎docs/gitbook/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
* [Max group size](bullmq-pro/groups/max-group-size.md)
8585
* [Pausing groups](bullmq-pro/groups/pausing-groups.md)
8686
* [Prioritized intra-groups](bullmq-pro/groups/prioritized.md)
87+
* [Sandboxes for groups](bullmq-pro/groups/sandboxes-for-groups.md)
8788
* [Batches](bullmq-pro/batches.md)
8889
* [NestJs](bullmq-pro/nestjs/README.md)
8990
* [Producers](bullmq-pro/nestjs/producers.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Sandboxes for groups
2+
3+
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:
4+
5+
```typescript
6+
module.exports = function (job: SandboxedJobPro) {
7+
expect(job).to.have.property('gid');
8+
expect(job.opts).to.have.property('group');
9+
expect(job.opts.group).to.have.property('id');
10+
expect(job.opts.group.id).to.be.a('string');
11+
expect(job.opts.group.id).to.equal(job.gid);
12+
};
13+
```

0 commit comments

Comments
 (0)
Please sign in to comment.