From f9fe8403d0210b634636a7c95dd748b63e6e14f4 Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Tue, 28 Feb 2017 16:39:06 -0500 Subject: [PATCH] SQL sort is faster than ruby sort. --- lib/tasks/evm_application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/evm_application.rb b/lib/tasks/evm_application.rb index 0b23e0d5f15..7b449ba28d7 100644 --- a/lib/tasks/evm_application.rb +++ b/lib/tasks/evm_application.rb @@ -92,7 +92,7 @@ def self.output_servers_status(servers) def self.output_workers_status(servers) data = [] servers.each do |s| - s.miq_workers.sort_by(&:type).each do |w| + s.miq_workers.order(:type).each do |w| data << [w.type, w.status,