1466
defaultTimeout *durationpb.Duration,
1467
attempt int32,
1469
>
// This util function is only for calculating active workflow task timeout.
1470
>
// Transient workflow task in passive cluster won't call this function and
1471
>
// always use default timeout as it will either be completely overwritten by
1472
>
// a replicated workflow schedule event from active cluster, or if used, it's
1473
>
// attempt will be reset to 1.
1474
>
// Check ApplyTransientWorkflowTaskScheduled for details.
1475
>
1476
>
if defaultTimeout == nil {
1477
defaultTimeout = durationpb.New(0)
1478
}
1479
1481
>
return defaultTimeout
1482
>
}
1483
1484
policy := backoff.NewExponentialRetryPolicy(workflowTaskRetryInitialInterval).