Sha256: 513d9e8139b2d68bd396300328b6e2647dfa8c2681e499d66aa7d23c03ff0b89
Contents?: true
Size: 674 Bytes
Versions: 11
Compression:
Stored size: 674 Bytes
Contents
require 'resque/tasks' require 'resque_scheduler/tasks' namespace :maintenance do task :stop_dr_jobs do exports = Myreplicator::Export.find(:all) exports.each do |export| Resque.remove_schedule(export.schedule_name) end Resque.remove_schedule("myreplicator_loader") Resque.remove_schedule("myreplicator_sweeper") Resque.remove_schedule("myreplicator_transporter") end task :start_dr_jobs do require 'rake' Rake::Task.load(Rails.root.to_s + "/lib/tasks/" + "resque.rake") resque_reload = Rake::Task['resque:reload_scheduled_jobs'] resque_reload.reenable resque_reload.execute(ENV["RAILS_ENV"]) end end
Version data entries
11 entries across 11 versions & 1 rubygems