# desc "Explaining what the task does" # task :cloudhdr_rails do # # Task goes here # end namespace :cloudhdr_rails do desc "Update pending CloudhdrJobs" task :update_pending_jobs => :environment do #e = CloudhdrJob.first #e.encodable # try to load cloudhdr config #e.encodable.class.read_cloudhdr_configuration ActsAsCloudhdr.read_cloudhdr_configuration #puts "api key = #{cloudhdr.api_key}" #puts "Rails.env = #{Rails.env}" puts "Updating #{CloudhdrJob.pending.count} CloudhdrJobs" CloudhdrJob.update_pending_jobs end end