Fix rake bug.

This commit is contained in:
BoHung Chiu 2022-06-13 16:19:03 +08:00
parent b8adf0c227
commit c4c876c074
1 changed files with 1 additions and 0 deletions

View File

@ -3,6 +3,7 @@ namespace :feeds_module do
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)
SiteFeedAnnc
SiteFeed.enabled.each do |site_feed|
feed_directory = File.join(main_directory.to_s, site_feed.id.to_s)
FileUtils.mkdir_p(feed_directory) if !File.exists?(feed_directory)