Class: ResqueWeb::FailuresController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ResqueWeb::FailuresController
- Defined in:
- app/controllers/resque_web/failures_controller.rb
Instance Method Summary collapse
-
#destroy ⇒ Object
remove an individual job from the failure queue.
-
#destroy_all ⇒ Object
destroy all jobs from the failure queue.
-
#index ⇒ Object
Display all jobs in the failure queue.
-
#retry ⇒ Object
retry an individual job from the failure queue.
-
#retry_all ⇒ Object
retry all jobs from the failure queue.
Methods inherited from ApplicationController
Instance Method Details
#destroy ⇒ Object
remove an individual job from the failure queue
13 14 15 16 |
# File 'app/controllers/resque_web/failures_controller.rb', line 13 def destroy Resque::Failure.remove(params[:id]) redirect_to failures_path(redirect_params) end |
#destroy_all ⇒ Object
destroy all jobs from the failure queue
19 20 21 22 23 |
# File 'app/controllers/resque_web/failures_controller.rb', line 19 def destroy_all queue = params[:queue] || 'failed' Resque::Failure.clear(queue) redirect_to failures_path(redirect_params) end |
#index ⇒ Object
Display all jobs in the failure queue
9 10 |
# File 'app/controllers/resque_web/failures_controller.rb', line 9 def index end |
#retry ⇒ Object
retry an individual job from the failure queue
26 27 28 29 |
# File 'app/controllers/resque_web/failures_controller.rb', line 26 def retry reque_single_job(params[:id]) redirect_to failures_path(redirect_params) end |
#retry_all ⇒ Object
retry all jobs from the failure queue
32 33 34 35 36 37 38 39 |
# File 'app/controllers/resque_web/failures_controller.rb', line 32 def retry_all if params[:queue].present? && params[:queue]!="failed" Resque::Failure.requeue_queue(params[:queue]) else (Resque::Failure.count-1).downto(0).each { |id| reque_single_job(id) } end redirect_to failures_path(redirect_params) end |