Skip to content

Commit

Permalink
Pass taskListActivitiesPerSecond down to ActivityWorker
Browse files Browse the repository at this point in the history
  • Loading branch information
sokada1221 committed Dec 12, 2020
1 parent e33ed95 commit 64d0838
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/com/uber/cadence/worker/Worker.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ public final class Worker implements Suspendable {

SingleWorkerOptions activityOptions =
SingleWorkerOptions.newBuilder()
.setDataConverter(client.getOptions().getDataConverter())
.setIdentity(client.getOptions().getIdentity())
.setPollerOptions(options.getActivityPollerOptions())
.setDataConverter(client.getOptions().getDataConverter())
.setTaskExecutorThreadPoolSize(options.getMaxConcurrentActivityExecutionSize())
.setTaskListActivitiesPerSecond(options.getTaskListActivitiesPerSecond())
.setPollerOptions(options.getActivityPollerOptions())
.setMetricsScope(metricsScope)
.setEnableLoggingInReplay(factoryOptions.isEnableLoggingInReplay())
.setContextPropagators(contextPropagators)
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/uber/cadence/worker/WorkerOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ public int getMaxConcurrentLocalActivityExecutionSize() {
return maxConcurrentLocalActivityExecutionSize;
}

public double getTaskListActivitiesPerSecond() {
return taskListActivitiesPerSecond;
}

public PollerOptions getActivityPollerOptions() {
return activityPollerOptions;
}
Expand Down

0 comments on commit 64d0838

Please sign in to comment.