Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

Commit

Permalink
don't stop loop if an app stuck
Browse files Browse the repository at this point in the history
Signed-off-by: Valentin Pichard <[email protected]>
  • Loading branch information
Valentin Pichard committed Jan 10, 2019
1 parent 1b3a4dc commit e362eb3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions helper/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"strings"
"time"

log "github.com/Sirupsen/logrus"
. "github.com/logrusorgru/aurora"
)

Expand Down Expand Up @@ -98,7 +99,7 @@ func readPumaStats(key Application) (pumaStatus, error) {

output, err := exec.Command(pcpath, "-S", pspath, "stats").Output()
//fmt.Println(pcpath, pspath)
//output, err := exec.Command("cat", "/go/src/github.com/dimelo/puma-helper/output.txt").Output()
//output, err := exec.Command("cat", "/go/src/github.com/dimelo/puma-helper/main.go").Output()
if err != nil {
return ps, err
}
Expand All @@ -123,7 +124,8 @@ func printApplicationGroups() error {

ps, err := readPumaStats(key)
if err != nil {
return err
log.Warn(fmt.Sprintf("[%s] configuration is invalid. Error: %v\n\n", appname, err))
continue
}

fmt.Printf("-> %s application\n", appname)
Expand Down

0 comments on commit e362eb3

Please sign in to comment.