refactor: use CallPlugnTrigger instead of PlugnTriggerOutput
Refs #6422
This commit is contained in:
@@ -43,12 +43,15 @@ func BuildConfig(appName string) error {
|
||||
}
|
||||
|
||||
appRoot := common.AppRoot(appName)
|
||||
s, err := common.PlugnTriggerOutput("ps-current-scale", []string{appName}...)
|
||||
results, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "ps-current-scale",
|
||||
Args: []string{appName},
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
scale, err := common.ParseScaleOutput(s)
|
||||
scale, err := common.ParseScaleOutput(results.StdoutBytes())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -78,7 +81,10 @@ func BuildConfig(appName string) error {
|
||||
ipAddress := GetContainerIpaddress(appName, processType, containerID)
|
||||
if ipAddress != "" {
|
||||
args := []string{appName, processType, containerIndexString, ipAddress}
|
||||
_, err := common.PlugnTriggerOutput("network-write-ipaddr", args...)
|
||||
_, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "network-write-ipaddr",
|
||||
Args: args,
|
||||
})
|
||||
if err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user