This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
2012-04-13 04:10:47 +00:00
|
|
|
require 'resque_scheduler'require 'resque_scheduler/server'
|
|
|
|
require 'yaml'
|
2012-04-13 04:10:47 +00:00
|
|
|
|
2012-04-13 04:10:47 +00:00
|
|
|
rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..'
|
|
|
|
rails_env = ENV['RAILS_ENV'] || 'development'
|
2012-04-13 04:10:47 +00:00
|
|
|
|
2012-04-13 04:10:47 +00:00
|
|
|
resque_config = YAML.load_file(rails_root + '/config/resque.yml')
|
|
|
|
Resque.redis = resque_config[rails_env]
|
2012-04-13 04:10:47 +00:00
|
|
|
|
2012-04-13 04:10:47 +00:00
|
|
|
Resque.schedule = YAML.load_file("#{Rails.root}/config/resque_schedule.yml")
|
2012-04-13 04:10:47 +00:00
|
|
|
Dir["#{Rails.root}/app/jobs/*.rb"].each { |file| require file }
|
|
|
|
|
2012-04-13 04:10:47 +00:00
|
|
|
# current_path = Rails.root.to_s.gsub(/\s/,'\ ')
|
|
|
|
# queues = [:test]
|