diff options
author | Valery Piashchynski <[email protected]> | 2023-03-21 09:20:16 +0100 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2023-03-21 09:20:16 +0100 |
commit | 19bd7089772d69bef9d84c57a677887d8bc803b9 (patch) | |
tree | 1fe174e0071e9a0248ed6a216e4b5166f14d8885 /internal/cli | |
parent | b9cb91f01e5b5a5d9880a8b181c35e811be43050 (diff) |
chore(deps): update dependencies
Diffstat (limited to 'internal/cli')
-rw-r--r-- | internal/cli/workers/render.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/cli/workers/render.go b/internal/cli/workers/render.go index 997a88f7..6d60f177 100644 --- a/internal/cli/workers/render.go +++ b/internal/cli/workers/render.go @@ -49,6 +49,10 @@ func WorkerTable(writer io.Writer, workers []*process.State) *tablewriter.Table // ServiceWorkerTable renders table with information about rr server workers. func ServiceWorkerTable(writer io.Writer, workers []*process.State) *tablewriter.Table { + sort.Slice(workers, func(i, j int) bool { + return workers[i].Pid < workers[j].Pid + }) + tw := tablewriter.NewWriter(writer) tw.SetAutoWrapText(false) tw.SetHeader([]string{"PID", "Memory", "CPU%", "Command"}) @@ -72,6 +76,10 @@ func ServiceWorkerTable(writer io.Writer, workers []*process.State) *tablewriter // JobsTable renders table with information about rr server jobs. func JobsTable(writer io.Writer, jobs []*jobs.State) *tablewriter.Table { + sort.Slice(jobs, func(i, j int) bool { + return jobs[i].Pipeline < jobs[j].Pipeline + }) + tw := tablewriter.NewWriter(writer) tw.SetAutoWrapText(false) tw.SetHeader([]string{"Status", "Pipeline", "Driver", "Queue", "Active", "Delayed", "Reserved"}) |