lib/cloudtasker/batch/batch_progress.rb in cloudtasker-0.2.0 vs lib/cloudtasker/batch/batch_progress.rb in cloudtasker-0.3.0

- old
+ new

@@ -52,15 +52,33 @@ def processing @processing ||= count('processing') end # + # Return the number of jobs with errors. + # + # @return [Integer] The number of errored jobs. + # + def errored + @errored ||= count('errored') + end + + # + # Return the number of dead jobs. + # + # @return [Integer] The number of dead jobs. + # + def dead + @dead ||= count('dead') + end + + # # Return the number of jobs not completed yet. # # @return [Integer] The number of jobs pending. # def pending - total - completed + total - completed - dead end # # Return the batch progress percentage. #