16 lines
450 B
Ruby
16 lines
450 B
Ruby
# Re-definitions are appended to existing tasks
|
|
|
|
# Embed tasks from Delayed_job
|
|
|
|
namespace :jobs do
|
|
desc "Clear the delayed_job queue."
|
|
task :clear => :environment do
|
|
Delayed::Job.delete_all
|
|
end
|
|
|
|
desc "Start a delayed_job worker."
|
|
task :work => :environment do
|
|
puts "Delayed::Job.new = #{Delayed::Job.new.inspect}"
|
|
::Delayed::Worker.new(:min_priority => ENV['MIN_PRIORITY'], :max_priority => ENV['MAX_PRIORITY']).start
|
|
end
|
|
end |