From 75b938ecc540af937eeccd29327e5a97381e539d Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期二, 24 十二月 2019 09:24:49 +0800 Subject: [PATCH] update --- app/master/master.go | 9 +++++++-- app/common.go | 8 ++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/common.go b/app/common.go index 8d4a04a..b0a605f 100644 --- a/app/common.go +++ b/app/common.go @@ -43,15 +43,11 @@ } // GetParams params -func GetParams(rKey, rValue string) []string { +func GetParams() []string { var params []string for k, v := range util.MapParames { - param := "-" + k + "=" + v - if k == rKey { - param = "-" + k + "=" + rValue - } - params = append(params, param) + params = append(params, "-"+k+"="+v) } return params diff --git a/app/master/master.go b/app/master/master.go index 728e3ca..3cad417 100644 --- a/app/master/master.go +++ b/app/master/master.go @@ -30,12 +30,17 @@ fetcher.fnInitDBAPI(util.FSI.IP, util.FSI.HTTPort, util.FSI.HBPort, util.FSI.DataPort, logo.Infoln) // fetcher.fnInitDBAPI("192.168.20.10", util.FSI.HTTPort, util.FSI.HBPort, util.FSI.DataPort, logo.Infoln) sdks := fetcher.fnSDKInfo() - + if len(sdks) == 0 { + logo.Errorln("!!!!!!Fetcher Can't Get SDK Infos From Remote DB") + return false + } return manualStart(ctx, sdks, configPath) } func manualStart(ctx context.Context, sdks []sdkstruct.SDKInfo, configPath string) bool { rPath := configPath + + params := app.GetParams() for _, v := range sdks { @@ -59,7 +64,7 @@ "-" + util.ConfigPath + "=" + file, } - args = append(args, app.GetParams(util.ConfigPath, file)...) + args = append(args, params...) pid, err := runProc(ctx, "./analysis", args, cfg.Env) if err != nil { -- Gitblit v1.8.0