func getJobsScheduledToMachine(r registry.Registry, machID string) []job.Job { var jobs []job.Job jj, _ := r.Jobs() for _, j := range jj { if j.TargetMachineID == "" || j.TargetMachineID != machID { continue } jobs = append(jobs, j) } return jobs }
func getUnitPage(reg registry.Registry, tok PageToken) (*schema.UnitPage, error) { all, err := reg.Jobs() if err != nil { return nil, err } page, err := extractUnitPage(reg, all, tok) if err != nil { return nil, err } return page, nil }