namespace :feeds_module do desc "Downloading feeds" task :make_cache,[:url] => :environment do |task,args| main_directory = File.join("#{Rails.root}","public","site_feeds") FileUtils.mkdir_p(main_directory) if !File.exist?(main_directory) SiteFeedAnnc #Don't remove this, this will auto require SiteFeedAnnc SiteFeed.enabled.each do |site_feed| FeedModel::Cache.recreate_annc_cache(site_feed) end end end