更新「lib/tasks/feeds_tasks.rake」

fix File.exists?
This commit is contained in:
chiu 2023-04-08 14:43:43 +00:00
parent 9fe3391543
commit 252c8d9ae2
1 changed files with 1 additions and 1 deletions

View File

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