diff --git a/lib/resque/failure.rb b/lib/resque/failure.rb index 102067142..88d86a0a9 100644 --- a/lib/resque/failure.rb +++ b/lib/resque/failure.rb @@ -67,6 +67,8 @@ def self.remove(index) backend.remove(index) end + # Requeues all failed jobs in a specific queue. + # Queue name should be a string. def self.requeue_queue(queue) i=0 while job = Resque::Failure.all(i) @@ -77,11 +79,13 @@ def self.requeue_queue(queue) end end + # Removes all failed jobs in a specific queue. + # Queue name should be a string. def self.remove_queue(queue) i=0 while job = Resque::Failure.all(i) if job['queue'] == queue - # This will remove from the queue so don't increment the index + # This will remove the failure from the array so do not increment the index. Resque::Failure.remove(i) else i+=1