isTaskBlocked checks if a task has unmet dependencies
(task *model.Task, taskMap map[string]*model.Task)
| 13 | |
| 14 | // isTaskBlocked checks if a task has unmet dependencies |
| 15 | func isTaskBlocked(task *model.Task, taskMap map[string]*model.Task) bool { |
| 16 | for _, depID := range task.Dependencies { |
| 17 | dep, exists := taskMap[depID] |
| 18 | if !exists || dep.Status != model.StatusCompleted { |
| 19 | return true |
| 20 | } |
| 21 | } |
| 22 | return len(task.Dependencies) > 0 && task.Status != model.StatusCompleted |
| 23 | } |
| 24 | |
| 25 | // groupSnapshots groups snapshots by a field |
| 26 | func groupSnapshots(snapshots []TaskSnapshot, groupBy string) map[string][]TaskSnapshot { |
no outgoing calls