1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Retry all, fixes #686

This commit is contained in:
Mike Perham 2013-02-19 20:36:59 -08:00
parent f333186ecf
commit f235f600db
2 changed files with 7 additions and 1 deletions

View file

@ -342,6 +342,12 @@ module Sidekiq
def initialize
super 'retry'
end
def retry_all
while size > 0
each(&:retry)
end
end
end

View file

@ -172,7 +172,7 @@ module Sidekiq
end
post "/retries/all/retry" do
Sidekiq::RetrySet.new.each { |job| job.retry }
Sidekiq::RetrySet.new.retry_all
redirect "#{root_path}retries"
end