Skip to content

Commit

Permalink
feat(zeebe): add deployResources method
Browse files Browse the repository at this point in the history
deploy multiple resources atomically

fixes #173
  • Loading branch information
jwulf committed Jun 12, 2024
2 parents 7228c65 + d8e13e1 commit 165862f
Show file tree
Hide file tree
Showing 7 changed files with 630 additions and 971 deletions.
139 changes: 59 additions & 80 deletions CHANGELOG.md

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,3 +281,31 @@ Please note that only jobs that become available _after_ the stream is opened ar
In this release, this is not handled for you. You must both poll and stream jobs to make sure that you get jobs that were available before your application started as well as jobs that become available after your application starts.

In a subsequent release, the ZeebeWorker will transparently handle this for you.

## Multi-tenant workers

Workers, both polling and streaming, can be multi-tenanted, requesting jobs from more than one tenant.

Example:

```typescript
client.createWorker({
taskHandler: (job) => {
console.log(job.tenantId) // '<default>' | 'green'
return job.complete()
},
taskType: 'multi-tenant-work',
tenantIds: ['<default>', 'green'],
})

client.streamJobs({
taskHandler: async (job) => {
console.log(job.tenantId) // '<default>' | 'green'
return job.complete()
},
type: 'multi-tenant-stream-work',
tenantIds: ['<default>', 'green'],
worker: 'stream-worker',
timeout: 2000,
})
```
Loading

0 comments on commit 165862f

Please sign in to comment.