lib/resque_scheduler/tasks.rb in sskirby-resque-scheduler-1.10.13 vs lib/resque_scheduler/tasks.rb in sskirby-resque-scheduler-1.10.14

- old
+ new

@@ -8,10 +8,19 @@ task :scheduler => :scheduler_setup do require 'resque' require 'resque_scheduler' Resque::Scheduler.verbose = true if ENV['VERBOSE'] + if File.exists?("config/airbrake.yml") + Resque::Scheduler.airbrake = true + Airbrake::configure do |config| + yaml = YAML.load_file("config/airbrake.yml") + yaml.each do |key, val| + config.send(:"#{key}=", val) + end + end + end Resque::Scheduler.run end task :scheduler_setup do if ENV['INITIALIZER_PATH'] @@ -19,6 +28,6 @@ else Rake::Task['resque:setup'].invoke end end -end \ No newline at end of file +end