1194
}
1195
1196
>
func (s *scheduler) getListInfo(inWorkflowContext bool) *schedulepb.ScheduleListInfo {
workflow.go
1197
>
// Note that `s` may be a `scheduler` created outside of a workflow context, used to
1198
>
// compute list info at creation time. In that case inWorkflowContext will be false,
1199
>
// and this function and anything it calls should not use s.ctx.
1200
>
1201
>
spec := common.CloneProto(s.Schedule.Spec)
1202
>
// clear fields that are too large/not useful for the list view
1203
>
spec.TimezoneData = nil
1204
>
1205
>
if s.hasMinVersion(LimitMemoSpecSize) {
1206
>
// Limit the number of specs and exclusions stored on the memo.
1207
>
limit := s.tweakables.SpecFieldLengthLimit
1208
>
spec.ExcludeStructuredCalendar = util.SliceHead(spec.ExcludeStructuredCalendar, limit)
1209
>
spec.Interval = util.SliceHead(spec.Interval, limit)
1210
>
spec.StructuredCalendar = util.SliceHead(spec.StructuredCalendar, limit)
1211
>
}
1212
1213
>
return &schedulepb.ScheduleListInfo{
workflow.go
1214
>
Spec: spec,
1215
>
WorkflowType: s.Schedule.Action.GetStartWorkflow().GetWorkflowType(),
1216
>
Notes: s.Schedule.State.Notes,
1217
>
Paused: s.Schedule.State.Paused,
1218
>
RecentActions: util.SliceTail(s.Info.RecentActions, s.tweakables.RecentActionCountForList),
1219
>
FutureActionTimes: s.getFutureActionTimes(inWorkflowContext, s.tweakables.FutureActionCountForList),
1220
>
}
1221
}
1222