Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into db-error-fast-fail
Browse files Browse the repository at this point in the history
  • Loading branch information
amyangfei committed Oct 17, 2019
2 parents 08d059c + 0c0fb4d commit 717aff8
Show file tree
Hide file tree
Showing 17 changed files with 2,418 additions and 701 deletions.
5 changes: 3 additions & 2 deletions checker/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"context"
"database/sql"
"encoding/json"
"errors"
"fmt"
"strings"
"sync"
Expand Down Expand Up @@ -235,9 +236,9 @@ func (c *Checker) Process(ctx context.Context, pr chan pb.ProcessResult) {
errs := make([]*pb.ProcessError, 0, 1)
result, err := check.Do(cctx, c.checkList)
if err != nil {
errs = append(errs, unit.NewProcessError(pb.ErrorType_CheckFailed, err.Error()))
errs = append(errs, unit.NewProcessError(pb.ErrorType_CheckFailed, err))
} else if !result.Summary.Passed {
errs = append(errs, unit.NewProcessError(pb.ErrorType_CheckFailed, "check was failed, please see detail"))
errs = append(errs, unit.NewProcessError(pb.ErrorType_CheckFailed, errors.New("check was failed, please see detail")))
}

c.updateInstruction(result)
Expand Down
Loading

0 comments on commit 717aff8

Please sign in to comment.