(spec *taskpkg.StartTaskSession)
| 838 | } |
| 839 | |
| 840 | func taskSessionName(spec *taskpkg.StartTaskSession) string { |
| 841 | if spec == nil { |
| 842 | return "task:#0" |
| 843 | } |
| 844 | |
| 845 | base := strings.TrimSpace(spec.Task.Title) |
| 846 | if base == "" { |
| 847 | base = strings.TrimSpace(spec.Task.Identifier) |
| 848 | } |
| 849 | if base == "" { |
| 850 | base = strings.TrimSpace(spec.Run.ID) |
| 851 | } |
| 852 | return fmt.Sprintf("task:%s#%d", base, spec.Run.Attempt) |
| 853 | } |
| 854 | |
| 855 | func taskSessionAgentName(taskRecord taskpkg.Task) string { |
| 856 | if taskRecord.Owner == nil || taskRecord.Owner.IsZero() { |
no outgoing calls