@@ -848,9 +848,7 @@ func (wtp *workflowTaskPoller) poll(ctx context.Context) (interface{}, error) {
848848 if response == nil || len (response .TaskToken ) == 0 {
849849 wtp .metricsScope .Counter (metrics .DecisionPollNoTaskCounter ).Inc (1 )
850850 wtp .updateBacklog (request .TaskList .GetKind (), 0 )
851- return & workflowTask {
852- autoConfigHint : response .GetAutoConfigHint (),
853- }, nil
851+ return & workflowTask {task : response }, nil
854852 }
855853
856854 wtp .updateBacklog (request .TaskList .GetKind (), response .GetBacklogCountHint ())
@@ -910,7 +908,6 @@ func (wtp *workflowTaskPoller) toWorkflowTask(response *s.PollForDecisionTaskRes
910908 task := & workflowTask {
911909 task : response ,
912910 historyIterator : historyIterator ,
913- autoConfigHint : response .GetAutoConfigHint (),
914911 }
915912 return task
916913}
@@ -1119,9 +1116,7 @@ func (atp *activityTaskPoller) pollWithMetrics(ctx context.Context,
11191116 return nil , err
11201117 }
11211118 if response == nil || len (response .TaskToken ) == 0 {
1122- return & activityTask {
1123- autoConfigHint : response .GetAutoConfigHint (),
1124- }, nil
1119+ return & activityTask {task : response }, nil
11251120 }
11261121
11271122 workflowType := response .WorkflowType .GetName ()
@@ -1133,7 +1128,7 @@ func (atp *activityTaskPoller) pollWithMetrics(ctx context.Context,
11331128 scheduledToStartLatency := time .Duration (response .GetStartedTimestamp () - response .GetScheduledTimestampOfThisAttempt ())
11341129 metricsScope .Timer (metrics .ActivityScheduledToStartLatency ).Record (scheduledToStartLatency )
11351130
1136- return & activityTask {task : response , pollStartTime : startTime , autoConfigHint : response . GetAutoConfigHint () }, nil
1131+ return & activityTask {task : response , pollStartTime : startTime }, nil
11371132}
11381133
11391134// PollTask polls a new task
0 commit comments