From 09444f9f10870f93669d70f026fb2504ccefb25a Mon Sep 17 00:00:00 2001 From: Ben Ubois Date: Sun, 28 Jul 2013 09:17:33 -0700 Subject: [PATCH] Memoize workers_size. --- lib/sidekiq/web.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sidekiq/web.rb b/lib/sidekiq/web.rb index f5da21b8..186f6345 100644 --- a/lib/sidekiq/web.rb +++ b/lib/sidekiq/web.rb @@ -46,7 +46,7 @@ module Sidekiq end def workers_size - Sidekiq.redis do |conn| + @workers_size ||= Sidekiq.redis do |conn| conn.scard('workers') end end