Regenerate missing optimized images for all dbs by default.

This commit is contained in:
Guo Xiang Tan 2016-09-02 13:06:31 +08:00
parent e4883725e6
commit df8d24734a

View file

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