Sha256: 88695ed98d9791c56663c11f819367f21c47507d1812dc6e0925f80993ae72f2
Contents?: true
Size: 1.05 KB
Versions: 2
Compression:
Stored size: 1.05 KB
Contents
# Resque tasks require 'resque/tasks' require 'resque/scheduler/tasks' task "resque:setup" => :environment namespace :resque do task :setup do require 'resque' require 'resque-scheduler' # you probably already have this somewhere attrs = { host: ENV['REDIS_HOST'] || 'localhost' port: ENV['REDIS_PORT'] || 6379 db: ENV['REDIS_DB'] || 0 password: ENV['REDIS_PASSWORD'] || nil } Resque.redis = Redis.new(attrs) # 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('config/workers_schedule.yml') end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bigbluebutton_rails-3.0.0 | config/resque/resque.rake |
bigbluebutton_rails-2.3.0 | config/resque/resque.rake |