Spree delayed job
The extension add a tab to the admin page to run jobs and display running jobs.
It’s based on the delayed_job and delayed_job_admin
Installation
To install, add delayed_job and spree_delayed_job to your Gemfile
and run `bundle install`:
gem 'delayed_job_active_record' gem 'spree_delayed_job'
After spree_delayed_job is installed, run the following commands: (see delayed_job for detailed info)
$ rails generate delayed_job:active_record $ rake db:migrate $ script/delayed_job start
Configuration
To add your jobs simply override (using Deface) or replace the app/views/spree/admin/shared/_spree_delayed_job.html.erb:
<!-- some sample tasks --> <% content_for :sidebar do %> <div class="box"> <h1>Run Jobs</h1> <ul class="sidebar" data-hook="spree_delayed_jobs"> <li><%= button_to "rake assets:clear", :action => "create" , :job => "assets:clear" %></li> <li><%= button_to "rake assets:precompile", :action => "create" , :job => "assets:precompile" %></li> </ul> </div> <% end %>
PLEASE NOTE: the gem it’s still under development and with this version you can run only rake tasks.
This project is released under MIT-LICENSE.