You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jobs can now be assigned to a group using the `groupId` option. This allows organizing related jobs together for easier monitoring and filtering in UIs.
8
+
9
+
```typescript
10
+
// Assign jobs to a group
11
+
awaitSendEmailJob.dispatch({ to: 'user@example.com' })
12
+
.group('newsletter-jan-2025')
13
+
.run()
14
+
15
+
// Combine with other options
16
+
awaitExportJob.dispatch({ userId: 1 })
17
+
.group('batch-export-123')
18
+
.toQueue('exports')
19
+
.priority(2)
20
+
.run()
21
+
```
22
+
23
+
### Use cases
24
+
25
+
-**Batch operations**: Group all jobs from a newsletter send, bulk export, or data migration
26
+
-**Monitoring**: Filter and view related jobs together in queue UIs
27
+
-**Debugging**: Easily find all jobs related to a specific operation
28
+
29
+
### API
30
+
31
+
The `groupId` is stored with the job data and can be accessed via:
32
+
33
+
```typescript
34
+
const record =awaitadapter.getJob('job-id', 'queue-name')
0 commit comments