FEATURE: add toggle for uploads:missing so it can skip external

Validating s3 uploads in uploads:missing can be very expensive, allow to
bypass.
This commit is contained in:
Sam Saffron 2019-05-21 16:06:35 +10:00
parent c86d2666c4
commit cb86d8279a
1 changed files with 5 additions and 1 deletions

View File

@ -589,7 +589,11 @@ task "uploads:missing" => :environment do
list_missing_uploads(skip_optimized: ENV['SKIP_OPTIMIZED'])
else
RailsMultisite::ConnectionManagement.each_connection do |db|
list_missing_uploads(skip_optimized: ENV['SKIP_OPTIMIZED'])
if ENV["SKIP_EXTERNAL"] == "1" && Discourse.store.external?
puts "#{RailsMultisite::ConnectionManagement.current_db} has uploads stored externally skipping!"
else
list_missing_uploads(skip_optimized: ENV['SKIP_OPTIMIZED'])
end
end
end
end