mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 03:40:00 +08:00
Rescue all errors when backfilling shas for uploads.
This commit is contained in:
parent
90571f0364
commit
f19232646f
|
@ -71,11 +71,8 @@ task "uploads:backfill_shas" => :environment do
|
|||
u.sha1 = Digest::SHA1.file(path).hexdigest
|
||||
u.save!
|
||||
putc "."
|
||||
rescue ActiveRecord::RecordInvalid
|
||||
puts "#{u.extension} is not valid"
|
||||
putc "X"
|
||||
rescue Errno::ENOENT
|
||||
putc "X"
|
||||
rescue => e
|
||||
putc "Skipping #{upload.original_filename} (#{upload.url}) #{e.message}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user