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,12 +373,12 @@ end
# regenerate missing optimized images
task "uploads:regenerate_missing_optimized" => :environment do
if ENV["RAILS_DB"]
regenerate_missing_optimized
end
task "uploads:regenerate_missing_optimized_all_sites" => :environment do
else
RailsMultisite::ConnectionManagement.each_connection { regenerate_missing_optimized }
end
end
def regenerate_missing_optimized
db = RailsMultisite::ConnectionManagement.current_db