feeds/lib/tasks/feeds_tasks.rake

11 lines
438 B
Ruby
Raw Normal View History

2015-07-07 11:51:56 +00:00
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.exists?(main_directory)
2022-09-25 11:34:29 +00:00
SiteFeedAnnc #Don't remove this, this will auto require SiteFeedAnnc
SiteFeed.enabled.each do |site_feed|
2022-09-25 11:34:29 +00:00
FeedModel::Cache.recreate_annc_cache(site_feed)
end
2015-07-07 11:51:56 +00:00
end
end