2012-05-07 02:23:16 +00:00
|
|
|
require 'resque_scheduler'
|
|
|
|
# require 'resque_scheduler/server'
|
|
|
|
# require 'yaml'
|
2012-04-13 04:10:47 +00:00
|
|
|
|
2012-05-07 02:23:16 +00:00
|
|
|
Resque.redis = 'localhost:6379'
|
2012-10-01 13:09:09 +00:00
|
|
|
Resque.redis.namespace = "resque:nccu_stage"
|
2012-04-13 04:10:47 +00:00
|
|
|
|
2012-05-07 02:23:16 +00:00
|
|
|
# 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
|
2012-04-13 04:10:47 +00:00
|
|
|
|
|
|
|
Dir["#{Rails.root}/app/jobs/*.rb"].each { |file| require file }
|
|
|
|
|
2012-05-07 02:23:16 +00:00
|
|
|
# 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(Rails.root.join('config', 'resque_schedule.yml'))
|