Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mutil task log #160

Merged
merged 2 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/mattn/go-sqlite3 v2.0.3+incompatible
github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca
github.com/vesoft-inc/nebula-http-gateway/ccore v0.0.0-20220329020324-f599adfab640
github.com/vesoft-inc/nebula-importer v1.0.1-0.20220314055243-ece1a79d37e5
github.com/vesoft-inc/nebula-importer v1.0.1-0.20220331072417-e7281ccc8a1a
go.uber.org/zap v1.17.0
gopkg.in/yaml.v2 v2.4.0
gorm.io/driver/sqlite v1.2.6
Expand Down
4 changes: 2 additions & 2 deletions server/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ github.com/vesoft-inc/nebula-go/v3 v3.0.0-20220214062853-d0c59964d0af h1:5z3eC9o
github.com/vesoft-inc/nebula-go/v3 v3.0.0-20220214062853-d0c59964d0af/go.mod h1:+sXv05jYQBARdTbTcIEsWVXCnF/6ttOlDK35xQ6m54s=
github.com/vesoft-inc/nebula-http-gateway/ccore v0.0.0-20220329020324-f599adfab640 h1:k0lt8tqjIWLpLhx39nNJzxq9G4/c4Szd1F0LZG5txfI=
github.com/vesoft-inc/nebula-http-gateway/ccore v0.0.0-20220329020324-f599adfab640/go.mod h1:sFEvE+cY4TgwqWx6H6msOqAUzRhsEHHKaaMgIZENHuQ=
github.com/vesoft-inc/nebula-importer v1.0.1-0.20220314055243-ece1a79d37e5 h1:YghW/f27/NEpP8h3yAn2p7WCZYUIx3rc+pdS3v9QmRc=
github.com/vesoft-inc/nebula-importer v1.0.1-0.20220314055243-ece1a79d37e5/go.mod h1:Hgn05JWXQcxyoJAjJVN34PnUndY+JcNKzpb0DoyFrsM=
github.com/vesoft-inc/nebula-importer v1.0.1-0.20220331072417-e7281ccc8a1a h1:h11b2euzCDnX9cKO6xLs0iqziAT8txCDjHunDUndd+k=
github.com/vesoft-inc/nebula-importer v1.0.1-0.20220331072417-e7281ccc8a1a/go.mod h1:Hgn05JWXQcxyoJAjJVN34PnUndY+JcNKzpb0DoyFrsM=
github.com/vmihailenco/msgpack/v5 v5.0.0/go.mod h1:HVxBVPUK/+fZMonk4bi1islLa8V3cfnBug0+4dykPzo=
github.com/vmihailenco/msgpack/v5 v5.3.4 h1:qMKAwOV+meBw2Y8k9cVwAy7qErtYCwBzZ2ellBfvnqc=
github.com/vmihailenco/msgpack/v5 v5.3.4/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
Expand Down
8 changes: 4 additions & 4 deletions server/pkg/webserver/service/importer/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

importconfig "github.com/vesoft-inc/nebula-importer/pkg/config"
importerErrors "github.com/vesoft-inc/nebula-importer/pkg/errors"
"github.com/vesoft-inc/nebula-importer/pkg/logger"
"github.com/vesoft-inc/nebula-studio/server/pkg/config"
"github.com/vesoft-inc/nebula-studio/server/pkg/utils"

Expand Down Expand Up @@ -95,18 +96,17 @@ func Import(taskID string, configPath string, configBody *importconfig.YAMLConfi
zap.L().Debug(fmt.Sprintf("Start a import task: `%s`", taskID))

var conf *importconfig.YAMLConfig
runnerLogger := logger.NewRunnerLogger("")
if configPath != "" {
conf, err = importconfig.Parse(
configPath,
)
conf, err = importconfig.Parse(configPath, runnerLogger)

if err != nil {
return err.(importerErrors.ImporterError)
}
} else {
conf = configBody
}
if err := conf.ValidateAndReset(""); err != nil {
if err := conf.ValidateAndReset("", runnerLogger); err != nil {
return err
}

Expand Down