lib/resque/server/helpers.rb in resque-1.24.1 vs lib/resque/server/helpers.rb in resque-1.25.0.pre

- old
+ new

@@ -30,19 +30,23 @@ def failed_end_at if failed_start_at + failed_per_page > failed_size failed_size else - failed_start_at + failed_per_page + failed_start_at + failed_per_page end end + def failed_order + params[:order] || 'desc' + end + def failed_class_counts(queue = params[:queue]) classes = Hash.new(0) Resque::Failure.each(0, Resque::Failure.count(queue), queue) do |_, item| class_name = item['payload']['class'] if item['payload'] class_name ||= "nil" classes[class_name] += 1 end classes end -end \ No newline at end of file +end