Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Capistrano helper tasks for Resque (requeue & remove failed jobs)

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.mdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 resque_utils.gemspec


ResqueUtils is a gem that gives you extra helper cap commands for use with Resque.


  • Capistrano
  • Resque


Firstly you'll need to install the gem, if you are using bundler add this to your Gemfile (but make sure it doesn't go in a gem group that isn't being sent to the server)...

gem 'resque_utils'

Open your deploy.rb and simple require the file...

require 'resque_utils/capistrano'

You'll then have the following commands available to you...

cap resque:failed:remove_all       # Remove all failed jobs
cap resque:failed:remove_specific  # Remove specific failed jobs (specify with '--set exception=SomeError')
cap resque:failed:remove_retried   # Remove all retried jobs
cap resque:failed:requeue_all      # Requeue all failed jobs
cap resque:failed:requeue_specific # Requeue specific failed jobs (specify with '--set exception=SomeError')

Obviously you won't want this to run on all your nodes, so make sure to filter to the node you want when you run it... cap resque:failed:remove_all

To run the specific commands, for example to requeue any job that failed with the exception SomeError...

cap resque:failed:requeue_specific --set exception=SomeError

You could also do something like this, although i'd really not recommend it...

before 'deploy:symlink', 'resque:failed:remove_all'
Something went wrong with that request. Please try again.