A resque inspired (read: stolen) interface for delayed_job. This gem is written to work with rails 3 and 4 applications using activerecord.
- Easily view jobs enqueued, working, pending, and failed.
- Queue any single job. or all pending jobs, to run immediately.
- Remove a failed job, or easily remove all failed jobs.
- Watch delayed_job operation with live ajax polling.
- Filter delayed_jobs by queue name
The interface (yea, a ripoff of resque-web):
Quick Start For Rails 3 and 4 Applications
Add the dependency to your Gemfile
Add the following route to your application for accessing the interface, and retrying failed jobs.
match "/delayed_job" => , :anchor => false, via: [:get, :post]
You probably want to password protect the interface, an easy way is to add something like this your config.ru file
if Rails.env.production? .use Rack::Auth::Basic do |username, password| username == 'username' && password == 'password' end end
delayed_job_web runs as a Sinatra application within the rails application. Visit it at
Serving static assets
If you mount the app on another route, you may encounter the CSS not working anymore. To work around this you can leverage a special HTTP header. Install it, activate it and configure it -- see below.
XSendFile On XSendFilePath /path/to/shared/bundle
XSendFilePath white-lists a directory from which static files are allowed to be served. This should be at least the path to where delayed_job_web is installed.
Using Rails you'll have to set
config.action_dispatch.x_sendfile_header = "X-Sendfile".
Nginx uses an equivalent that's called
X-Accel-Redirect, further instructions can be found in their wiki.
Rails' will need to be configured to
config.action_dispatch.x_sendfile_header = "X-Accel-Redirect".
Lighty is more
X-Sendfile, like outlined in their wiki.
- Send a pull request
Releasing a new version
- Update the version in
git commit delayed_job_web.gemspecwith the following message format:
Version x.x.x Changelog: * Some new feature * Some new bug fix
Erick Schmitt - @ejschmitt