mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 13:03:45 +08:00
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:
parent
c86d2666c4
commit
cb86d8279a
|
@ -589,7 +589,11 @@ task "uploads:missing" => :environment do
|
||||||
list_missing_uploads(skip_optimized: ENV['SKIP_OPTIMIZED'])
|
list_missing_uploads(skip_optimized: ENV['SKIP_OPTIMIZED'])
|
||||||
else
|
else
|
||||||
RailsMultisite::ConnectionManagement.each_connection do |db|
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user