Use another rake task to regenerate optimized images for multisite.

This commit is contained in:
Guo Xiang Tan 2016-08-19 15:52:09 +08:00
parent 3141c179f7
commit 5222022842
1 changed files with 2 additions and 2 deletions

View File

@ -370,10 +370,10 @@ end
# regenerate missing optimized images
task "uploads:regenerate_missing_optimized" => :environment do
ENV["RAILS_DB"] ? regenerate_missing_optimized : regenerate_missing_optimized_all_sites
regenerate_missing_optimized
end
def regenerate_missing_optimized_all_sites
task "uploads:regenerate_missing_optimized_all_sites" => :environment do
RailsMultisite::ConnectionManagement.each_connection { regenerate_missing_optimized }
end