From 3c6281490b651e4ecd8584111c3880b2666edc20 Mon Sep 17 00:00:00 2001 From: Andrew Selder Date: Fri, 18 May 2012 15:04:25 -0700 Subject: [PATCH] Use inject rather than sum to compute backlog size Sum is not a built in method on Enumerable, it is an extension defined in ActiveSupport. This allows a more generic and universal use of the web ui. --- web/views/index.slim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/views/index.slim b/web/views/index.slim index f04a42d9..a4c0d72d 100644 --- a/web/views/index.slim +++ b/web/views/index.slim @@ -5,7 +5,7 @@ p Failed: #{failed} p Busy Workers: #{workers.size} p Retries Pending: #{retry_count} - p Queue Backlog: #{queues.map{|q,size| size}.sum} + p Queue Backlog: #{queues.values.inject(0){|memo, val| memo + val}} .tabbable ul.nav.nav-tabs