A shorter and more concise version of select..size

This commit is contained in:
Tan Le 2015-04-12 22:26:48 +10:00
parent 0ba2ac97f2
commit c55fdc7a75

View file

@ -14,7 +14,7 @@ module Jobs
end end
def self.num_email_retry_jobs def self.num_email_retry_jobs
Sidekiq::RetrySet.new.select { |job| job.klass =~ /Email$/ }.size Sidekiq::RetrySet.new.count { |job| job.klass =~ /Email$/ }
end end
class Base class Base