Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanpelikan committed Feb 28, 2024
2 parents b1b25cb + ace78d5 commit 54168f8
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,16 @@ public void accept(
public void openWorkers() {

// fetch all usertasks spawned
workers.add(
client
.newWorker()
.jobType("io.camunda.zeebe:userTask")
.handler(userTaskHandler)
.timeout(Integer.MAX_VALUE) // user-tasks are not fetched more than once
.name(workerId)
.tenantIds(userTaskTenantIds.stream().toList()));
if(!userTaskTenantIds.isEmpty()){
workers.add(
client
.newWorker()
.jobType("io.camunda.zeebe:userTask")
.handler(userTaskHandler)
.timeout(Integer.MAX_VALUE) // user-tasks are not fetched more than once
.name(workerId)
.tenantIds(userTaskTenantIds.stream().toList()));
}

workers
.forEach(JobWorkerBuilderStep3::open);
Expand Down

0 comments on commit 54168f8

Please sign in to comment.