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

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

Validating s3 uploads in uploads:missing can be very expensive, allow to bypass.

diff --git a/lib/tasks/uploads.rake b/lib/tasks/uploads.rake
index c5bcb65..a644224 100644
--- a/lib/tasks/uploads.rake
+++ b/lib/tasks/uploads.rake
@@ -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

GitHub sha: cb86d827