Sha256: c29b7758812ab10d5ee09623f9259c03e8c7c8b82cfb3100b871400d0f415a7e
Contents?: true
Size: 1.71 KB
Versions: 50
Compression:
Stored size: 1.71 KB
Contents
require_relative 'task_helper' namespace :dad do namespace :resque do desc "Resqueをインストールします。" task :install => :environment do template = File.join(File.dirname(__FILE__), 'resque', 'app.god.erb') config = File.join('tmp', "#{app_name}.god") render(template, :to => config) template = File.join(File.dirname(__FILE__), 'resque', 'install.sh.erb') script = File.join('tmp', 'resque-install.sh') render(template, :to => script) fail unless system("bash -ex #{script}") end end end if defined?(Resque::Scheduler) require 'resque/tasks' require 'resque/scheduler/tasks' namespace :resque do task :setup do require 'resque' require 'resque/scheduler' # If you want to be able to dynamically change the schedule, # uncomment this line. A dynamic schedule can be updated via the # Resque::Scheduler.set_schedule (and remove_schedule) methods. # When dynamic is set to true, the scheduler process looks for # schedule changes and applies them on the fly. # Note: This feature is only available in >=2.0.0. Resque::Scheduler.dynamic = true # The schedule doesn't need to be stored in a YAML, it just needs to # be a hash. YAML is usually the easiest. #Resque.schedule = YAML.load_file('your_resque_schedule.yml') # If your schedule already has +queue+ set for each job, you don't # need to require your jobs. This can be an advantage since it's # less code that resque-scheduler needs to know about. But in a small # project, it's usually easier to just include you job classes here. # So, something like this: #require 'jobs' end end end
Version data entries
50 entries across 50 versions & 1 rubygems