merged cont.
[opensuse:yast-rest-service.git] / webservice / vendor / plugins / delayed_job / tasks / tasks.rb
1 # Re-definitions are appended to existing tasks
2 task :environment
3 task :merb_env
4
5 namespace :jobs do
6   desc "Clear the delayed_job queue."
7   task :clear => [:merb_env, :environment] do
8     Delayed::Job.delete_all
9   end
10
11   desc "Start a delayed_job worker."
12   task :work => [:merb_env, :environment] do
13     Delayed::Worker.new(:min_priority => ENV['MIN_PRIORITY'], :max_priority => ENV['MAX_PRIORITY']).start
14   end
15 end