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 Oct 23, 2020
1 parent 144c32c commit 42eee7a
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 @@ -141,12 +141,13 @@ private static SingleWorkerOptions toActivityOptions(
.put(MetricsTag.TASK_LIST, taskList)
.build();
return new SingleWorkerOptions.Builder()
.setDataConverter(options.getDataConverter())
.setIdentity(options.getIdentity())
.setDataConverter(options.getDataConverter())
.setTaskExecutorThreadPoolSize(options.getMaxConcurrentActivityExecutionSize())
.setTaskListActivitiesPerSecond(options.getTaskListActivitiesPerSecond())
.setPollerOptions(options.getActivityPollerOptions())
.setReportCompletionRetryOptions(options.getReportActivityCompletionRetryOptions())
.setReportFailureRetryOptions(options.getReportActivityFailureRetryOptions())
.setTaskExecutorThreadPoolSize(options.getMaxConcurrentActivityExecutionSize())
.setMetricsScope(options.getMetricsScope().tagged(tags))
.setEnableLoggingInReplay(options.getEnableLoggingInReplay())
.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 @@ -281,6 +281,10 @@ public int getMaxConcurrentLocalActivityExecutionSize() {
return maxConcurrentLocalActivityExecutionSize;
}

public double getTaskListActivitiesPerSecond() {
return taskListActivitiesPerSecond;
}

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

0 comments on commit 42eee7a

Please sign in to comment.