Exemplo n.º 1
0
func (a *apiServer) removePipelineController(name string) error {
	pipelineController, ok := a.pipelineNameToPipelineController[name]
	if ok {
		return pipelineController.Cancel()
	}
	protolog.Warnf("pachyderm.pps.pipelineserver: no pipeline registered for name: %s", name)
	return nil
}
Exemplo n.º 2
0
Arquivo: util.go Projeto: sr/protoeasy
func getGoPath() (string, error) {
	goPath := os.Getenv("GOPATH")
	if goPath == "" {
		return "", errGoPathNotSet
	}
	split := strings.Split(goPath, ":")
	if len(split) > 1 {
		protolog.Warnf("protoeasy: GOPATH %s has multiple directories, using first directory %s", goPath, split[0])
		return split[0], nil
	}
	return goPath, nil
}
Exemplo n.º 3
0
func (a *apiServer) addPipelineController(pipelineInfo *pps.PipelineInfo) error {
	if _, ok := a.pipelineNameToPipelineController[pipelineInfo.Pipeline.Name]; ok {
		protolog.Warnf("pachyderm.pps.pipelineserver: had a create change event for an existing pipeline: %v", pipelineInfo)
		if err := a.removePipelineController(pipelineInfo.Pipeline.Name); err != nil {
			return err
		}
	}
	pipelineController := newPipelineController(
		a.pfsAPIClient,
		a.jobAPIClient,
		pps.NewLocalPipelineAPIClient(a),
		pipelineInfo,
	)
	a.pipelineNameToPipelineController[pipelineInfo.Pipeline.Name] = pipelineController
	return pipelineController.Start()
}