src/client/pps.go
func (c APIClient) FlushJob(commits []*pfs.Commit, toPipelines []string, f func(*pps.JobInfo) error) error {
	req := &pps.FlushJobRequest{
		Commits: commits,
	}
	for _, pipeline := range toPipelines {
		req.ToPipelines = append(req.ToPipelines, NewPipeline(pipeline))
	}
	client, err := c.PpsAPIClient.FlushJob(c.Ctx(), req)
	if err != nil {
		return grpcutil.ScrubGRPC(err)
	}
	for {
		jobInfo, err := client.Recv()
		if err != nil {
			if err == io.EOF {
				return nil
			}
			return grpcutil.ScrubGRPC(err)
		}
		if err := f(jobInfo); err != nil {
			return err
		}
	}
}
func (c APIClient) FlushJob(commits []*pfs.Commit, toPipelines []string, f func(*pps.JobInfo) error) error {
	req := &pps.FlushJobRequest{
		Commits: commits,
	}
	for _, pipeline := range toPipelines {
		req.ToPipelines = append(req.ToPipelines, NewPipeline(pipeline))
	}
	client, err := c.PpsAPIClient.FlushJob(c.Ctx(), req)
	if err != nil {
		return grpcutil.ScrubGRPC(err)
	}
	for {
		jobInfo, err := client.Recv()
		if err != nil {
			if err == io.EOF {
				return nil
			}
			return grpcutil.ScrubGRPC(err)
		}
		if err := f(jobInfo); err != nil {
			return err
		}
	}
}
func ( c APIClient ) FlushJob ( commits [ ] * pfs . Commit , toPipelines [ ] string , f func ( * pps . JobInfo ) error ) error { req := & pps . FlushJobRequest { Commits : commits , } for _ , pipeline := range toPipelines { req . ToPipelines = append ( req . ToPipelines , NewPipeline ( pipeline ) ) } client , err := c . PpsAPIClient . FlushJob ( c . Ctx ( ) , req ) if err != nil { return grpcutil . ScrubGRPC ( err ) } for { jobInfo , err := client . Recv ( ) if err != nil { if err == io . EOF { return nil } return grpcutil . ScrubGRPC ( err ) } if err := f ( jobInfo ) ; err != nil { return err } } }
// FlushJob calls f with all the jobs which were triggered by commits.
// If toPipelines is non-nil then only the jobs between commits and those
// pipelines in the DAG will be returned.
FlushJob calls f with all the jobs which were triggered by commits . If toPipelines is non - nil then only the jobs between commits and those pipelines in the DAG will be returned .