Merge pull request #96 from 5apps/feature/single_container_migration

Skip migration for users with too many files
This commit is contained in:
galfert 2016-09-08 12:52:29 +02:00 committed by GitHub
commit d81a4b8314

View File

@ -68,11 +68,19 @@ class Migrator
logger.debug "Full listing: #{listing}" logger.debug "Full listing: #{listing}"
if 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| listing.split("\n").each do |item|
if is_document? item if is_document? item
copy_document(item) copy_document(item)
end end
end end
end end
end end