Skip to content

Commit f9d85a0

Browse files
fix(ps): use new sdk for sorted processes (#210)
1 parent 09ca839 commit f9d85a0

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

cmd/ps.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,16 @@ func (d DeisCmd) PsRestart(appID, target string) error {
103103
return nil
104104
}
105105

106-
func printProcesses(appID string, processes []api.Pods, wOut io.Writer) {
107-
psMap := ps.ByType(processes)
106+
func printProcesses(appID string, input []api.Pods, wOut io.Writer) {
107+
processes := ps.ByType(input)
108108

109109
fmt.Fprintf(wOut, "=== %s Processes\n", appID)
110110

111-
for psType, procs := range psMap {
112-
fmt.Fprintf(wOut, "--- %s:\n", psType)
111+
for _, process := range processes {
112+
fmt.Fprintf(wOut, "--- %s:\n", process.Type)
113113

114-
for _, proc := range procs {
115-
fmt.Fprintf(wOut, "%s %s (%s)\n", proc.Name, proc.State, proc.Release)
114+
for _, pod := range process.PodsList {
115+
fmt.Fprintf(wOut, "%s %s (%s)\n", pod.Name, pod.State, pod.Release)
116116
}
117117
}
118118
}

glide.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

glide.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ import:
1616
- package: github.com/olekukonko/tablewriter
1717
- package: github.com/arschles/assert
1818
- package: github.com/deis/controller-sdk-go
19-
version: 72235ec0aa14429beb569bf0b20984fc983d8aaa
19+
version: 383a9c0cdf4591127f3dad8b7b9fa48462b1f8d0

0 commit comments

Comments
 (0)