// operateSubTaskStageWithoutConfig returns TaskOp additionally to record metrics.
operateSubTaskStageWithoutConfig returns TaskOp additionally to record metrics.
// operateSubTaskStageWithoutConfig returns TaskOp additionally to record metrics .
func (w *SourceWorker) operateSubTaskStageWithoutConfig(stage ha.Stage) (string, error) {
	var subTaskCfg config.SubTaskConfig
	if stage.Expect == pb.Stage_Running || stage.Expect == pb.Stage_Stopped {
		if st := w.subTaskHolder.findSubTask(stage.Task); st == nil {
			tsm, _, err := ha.GetSubTaskCfg(w.etcdClient, stage.Source, stage.Task, stage.Revision)
			if err != nil {
				return opErrTypeBeforeOp, terror.Annotate(err, "fail to get subtask config from etcd")
			}
			var ok bool
			if subTaskCfg, ok = tsm[stage.Task]; !ok {
				return opErrTypeBeforeOp, terror.ErrWorkerFailToGetSubtaskConfigFromEtcd.Generate(stage.Task)
			}
		}
	}
	return w.operateSubTaskStage(stage, subTaskCfg)
}
func ( w * SourceWorker ) operateSubTaskStageWithoutConfig ( stage ha . Stage ) ( string , error ) { var subTaskCfg config . SubTaskConfig if stage . Expect == pb . Stage_Running || stage . Expect == pb . Stage_Stopped { if st := w . subTaskHolder . findSubTask ( stage . Task ) ; st == nil { tsm , _ , err := ha . GetSubTaskCfg ( w . etcdClient , stage . Source , stage . Task , stage . Revision ) if err != nil { return opErrTypeBeforeOp , terror . Annotate ( err , " " ) } var ok bool if subTaskCfg , ok = tsm [ stage . Task ] ; ! ok { return opErrTypeBeforeOp , terror . ErrWorkerFailToGetSubtaskConfigFromEtcd . Generate ( stage . Task ) } } } return w . operateSubTaskStage ( stage , subTaskCfg ) }
operateSubTaskStageWithoutConfig returns TaskOp additionally to record metrics.
operateSubTaskStageWithoutConfig returns TaskOp additionally to record metrics .
// TODO: need retry