refactor: use CallPlugnTrigger instead of PlugnTriggerOutput

Refs #6422
This commit is contained in:
Jose Diaz-Gonzalez
2024-03-14 01:18:28 -04:00
parent a9933c7f02
commit cdff4ae867
15 changed files with 149 additions and 58 deletions

View File

@@ -129,8 +129,11 @@ func reportRestartPolicy(appName string) string {
}
func reportRestore(appName string) string {
b, _ := common.PlugnTriggerOutput("config-get", []string{appName, "DOKKU_APP_RESTORE"}...)
restore := strings.TrimSpace(string(b[:]))
results, _ := common.CallPlugnTrigger(common.PlugnTriggerInput{
Trigger: "config-get",
Args: []string{appName, "DOKKU_APP_RESTORE"},
})
restore := results.StdoutContents()
if restore == "0" {
restore = "false"
} else {