Skip to content

Commit

Permalink
fix: opt pump cache, issue: TencentBlueKing#296
Browse files Browse the repository at this point in the history
  • Loading branch information
tbs60 committed Sep 25, 2024
1 parent aeb8507 commit f0d871d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/backend/booster/bk_dist/controller/pkg/manager/basic/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,21 @@ func searchCC(exe string) []string {
}

func searchAS(exe string) []string {
cmd := "which as"
cmd := fmt.Sprintf("%s -print-prog-name=as", exe)
blog.Infof("basic: ready run cmd:[%s] for exe:%s", cmd, exe)
sandbox := dcSyscall.Sandbox{}
_, out, _, err := sandbox.ExecScriptsWithMessage(cmd)
if err != nil {
blog.Warnf("basic: search as with out:%s,error:%+v", out, err)
return nil

cmd = "which as"
blog.Infof("basic: ready run cmd:[%s] for exe:%s", cmd, exe)
sandbox = dcSyscall.Sandbox{}
_, out, _, err = sandbox.ExecScriptsWithMessage(cmd)
if err != nil {
blog.Warnf("basic: search as with out:%s,error:%+v", out, err)
return nil
}
}

blog.Infof("basic: got output:[%s] for cmd:[%s]", out, cmd)
Expand Down

0 comments on commit f0d871d

Please sign in to comment.