(ctx context.Context, summary *Summary)
| 1645 | } |
| 1646 | |
| 1647 | func (m *Service) enrichTaskSummary(ctx context.Context, summary *Summary) (Summary, error) { |
| 1648 | childCount, err := m.store.CountDirectChildren(ctx, summary.ID) |
| 1649 | if err != nil { |
| 1650 | return Summary{}, err |
| 1651 | } |
| 1652 | dependencies, err := m.store.ListDependencies(ctx, summary.ID) |
| 1653 | if err != nil { |
| 1654 | return Summary{}, err |
| 1655 | } |
| 1656 | runs, err := m.store.ListTaskRuns(ctx, RunQuery{TaskID: summary.ID}) |
| 1657 | if err != nil { |
| 1658 | return Summary{}, err |
| 1659 | } |
| 1660 | events, err := m.store.ListTaskEvents(ctx, EventQuery{TaskID: summary.ID, Limit: 1}) |
| 1661 | if err != nil { |
| 1662 | return Summary{}, err |
| 1663 | } |
| 1664 | return m.enrichTaskSummaryFromState(ctx, taskRecordFromSummary(summary), childCount, dependencies, runs, events) |
| 1665 | } |
| 1666 | |
| 1667 | func (m *Service) enrichTaskSummaryFromState( |
| 1668 | ctx context.Context, |
no test coverage detected