// HandleError handle worker error.
HandleError handle worker error.
// HandleError handle worker error .
func (w *SourceWorker) HandleError(ctx context.Context, req *pb.HandleWorkerErrorRequest) (string, error) {
	w.Lock()
	defer w.Unlock()
	if w.closed.Load() {
		return "", terror.ErrWorkerAlreadyClosed.Generate()
	}
	st := w.subTaskHolder.findSubTask(req.Task)
	if st == nil {
		return "", terror.ErrWorkerSubTaskNotFound.Generate(req.Task)
	}
	return st.HandleError(ctx, req, w.getRelayWithoutLock())
}
func ( w * SourceWorker ) HandleError ( ctx context . Context , req * pb . HandleWorkerErrorRequest ) ( string , error ) { w . Lock ( ) defer w . Unlock ( ) if w . closed . Load ( ) { return " " , terror . ErrWorkerAlreadyClosed . Generate ( ) } st := w . subTaskHolder . findSubTask ( req . Task ) if st == nil { return " " , terror . ErrWorkerSubTaskNotFound . Generate ( req . Task ) } return st . HandleError ( ctx , req , w . getRelayWithoutLock ( ) ) }
HandleError handle worker error.
HandleError handle worker error .