Skip migration for users with too many files

This commit is contained in:
Garret Alfert 2016-09-08 11:45:41 +02:00
parent 9ca8a7d507
commit 08a2754936

View File

@ -68,11 +68,19 @@ class Migrator
logger.debug "Full listing: #{listing}"
if listing
# skip user when there are more files than we can list
if listing.split("\n").size > 9999
File.open('log/10k_users.log', 'a') { |f| f.puts username }
raise "User has too many files"
end
listing.split("\n").each do |item|
if is_document? item
copy_document(item)
end
end
end
end