@@ -834,20 +834,8 @@ private GetWorkflowExecutionHistoryResponse getWorkflowExecutionHistory(
834
834
GetWorkflowExecutionHistoryRequest getRequest ) throws TException {
835
835
ThriftResponse <WorkflowService .GetWorkflowExecutionHistory_result > response = null ;
836
836
try {
837
- ThriftRequest <WorkflowService .GetWorkflowExecutionHistory_args > request ;
838
- if (getRequest .isWaitForNewEvent ()) {
839
- request =
840
- buildThriftRequest (
841
- "GetWorkflowExecutionHistory" ,
842
- new WorkflowService .GetWorkflowExecutionHistory_args (getRequest ),
843
- options .getRpcLongPollTimeoutMillis ());
844
- } else {
845
- request =
846
- buildThriftRequest (
847
- "GetWorkflowExecutionHistory" ,
848
- new WorkflowService .GetWorkflowExecutionHistory_args (getRequest ));
849
- }
850
-
837
+ ThriftRequest <WorkflowService .GetWorkflowExecutionHistory_args > request =
838
+ buildGetWorkflowExecutionHistoryThriftRequest (getRequest );
851
839
response = doRemoteCall (request );
852
840
WorkflowService .GetWorkflowExecutionHistory_result result =
853
841
response .getBody (WorkflowService .GetWorkflowExecutionHistory_result .class );
@@ -881,6 +869,24 @@ private GetWorkflowExecutionHistoryResponse getWorkflowExecutionHistory(
881
869
}
882
870
}
883
871
872
+ private ThriftRequest <WorkflowService .GetWorkflowExecutionHistory_args >
873
+ buildGetWorkflowExecutionHistoryThriftRequest (GetWorkflowExecutionHistoryRequest getRequest ) {
874
+ ThriftRequest <WorkflowService .GetWorkflowExecutionHistory_args > request ;
875
+ if (getRequest .isWaitForNewEvent ()) {
876
+ request =
877
+ buildThriftRequest (
878
+ "GetWorkflowExecutionHistory" ,
879
+ new WorkflowService .GetWorkflowExecutionHistory_args (getRequest ),
880
+ options .getRpcLongPollTimeoutMillis ());
881
+ } else {
882
+ request =
883
+ buildThriftRequest (
884
+ "GetWorkflowExecutionHistory" ,
885
+ new WorkflowService .GetWorkflowExecutionHistory_args (getRequest ));
886
+ }
887
+ return request ;
888
+ }
889
+
884
890
@ Override
885
891
public PollForDecisionTaskResponse PollForDecisionTask (PollForDecisionTaskRequest request )
886
892
throws TException {
@@ -2298,9 +2304,7 @@ public void GetWorkflowExecutionHistory(
2298
2304
CompletableFuture <ThriftResponse <GetWorkflowExecutionHistory_result >> response = null ;
2299
2305
try {
2300
2306
ThriftRequest <WorkflowService .GetWorkflowExecutionHistory_args > request =
2301
- buildThriftRequest (
2302
- "GetWorkflowExecutionHistory" ,
2303
- new WorkflowService .GetWorkflowExecutionHistory_args (getRequest ));
2307
+ buildGetWorkflowExecutionHistoryThriftRequest (getRequest );
2304
2308
response = doRemoteCallAsync (request );
2305
2309
2306
2310
response
0 commit comments