@@ -44,11 +44,12 @@ type AppStatusInfo struct {
4444// For app that have at least 1 dependency, we calculate the overall state
4545// as follow:
4646//
47- // running: all running
48- // stopped: all stopped
49- // failed: at least one failed
50- // stopping: at least one stopping
51- // starting: at least one starting
47+ // running: all running
48+ // stopped: all stopped
49+ // failed: at least one failed
50+ // stopped: at least one stopped
51+ // stopping: at least one stopping
52+ // starting: at least one starting
5253func parseAppStatus (containers []container.Summary ) []AppStatusInfo {
5354 apps := make ([]AppStatusInfo , 0 , len (containers ))
5455 appsStatusMap := make (map [string ][]Status )
@@ -84,7 +85,7 @@ func parseAppStatus(containers []container.Summary) []AppStatusInfo {
8485 }
8586
8687 // ...else we have multiple different status we calculate the status
87- // among the possible left: {failed, stopping, starting}
88+ // among the possible left: {failed, stopping, stopped, starting}
8889 if slices .ContainsFunc (s , func (v Status ) bool { return v == StatusFailed }) {
8990 appendResult (appPath , StatusFailed )
9091 continue
@@ -93,6 +94,10 @@ func parseAppStatus(containers []container.Summary) []AppStatusInfo {
9394 appendResult (appPath , StatusStopping )
9495 continue
9596 }
97+ if slices .ContainsFunc (s , func (v Status ) bool { return v == StatusStopped }) {
98+ appendResult (appPath , StatusFailed )
99+ continue
100+ }
96101 if slices .ContainsFunc (s , func (v Status ) bool { return v == StatusStarting }) {
97102 appendResult (appPath , StatusStarting )
98103 continue
0 commit comments