2015-07-07 11:51:56 +00:00
|
|
|
namespace :feeds_module do
|
|
|
|
desc "Downloading feeds"
|
|
|
|
task :make_cache,[:url] => :environment do |task,args|
|
2020-04-05 14:36:09 +00:00
|
|
|
main_directory = File.join("#{Rails.root}","public","site_feeds")
|
2023-04-08 14:43:43 +00:00
|
|
|
FileUtils.mkdir_p(main_directory) if !File.exist?(main_directory)
|
2022-09-25 11:34:29 +00:00
|
|
|
SiteFeedAnnc #Don't remove this, this will auto require SiteFeedAnnc
|
2020-04-05 14:36:09 +00:00
|
|
|
SiteFeed.enabled.each do |site_feed|
|
2024-10-13 13:47:51 +00:00
|
|
|
Feeds::Cache.recreate_annc_cache(site_feed)
|
2020-04-05 14:36:09 +00:00
|
|
|
end
|
2015-07-07 11:51:56 +00:00
|
|
|
end
|
|
|
|
end
|