Improved memory usage on verify storage contend based on checksums.

This commit is contained in:
Martin Edenhofer 2017-06-19 08:23:07 +02:00
parent 99c05d5176
commit e3214e3ac2

View file

@ -78,7 +78,9 @@ in case of fixing sha hash use:
def self.verify(fix_it = nil)
success = true
Store::File.all.each { |item|
file_ids = Store::File.all.pluck(:id)
file_ids.each { |item_id|
item = Store::File.find(item_id)
content = item.content
sha = Digest::SHA256.hexdigest(content)
logger.info "CHECK: Store::File.find(#{item.id})"