From ccb6819102240ec717c3357a6d7b13d59b31f823 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Fri, 21 Nov 2014 15:39:32 -0300 Subject: [PATCH] virtuoso: avoid loading all objects into memory --- plugins/virtuoso/lib/virtuoso_plugin/noosfero_harvest.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/virtuoso/lib/virtuoso_plugin/noosfero_harvest.rb b/plugins/virtuoso/lib/virtuoso_plugin/noosfero_harvest.rb index 624a6d4..ee3f90b 100644 --- a/plugins/virtuoso/lib/virtuoso_plugin/noosfero_harvest.rb +++ b/plugins/virtuoso/lib/virtuoso_plugin/noosfero_harvest.rb @@ -48,7 +48,7 @@ class VirtuosoPlugin::NoosferoHarvest def triplify_comments(article) total = article.comments.count count = 0 - article.comments.each do |comment| + article.comments.find_each do |comment| begin subject_identifier = url_for(comment.url) puts "triplify #{subject_identifier} comment (#{count+=1}/#{total})" @@ -91,7 +91,7 @@ class VirtuosoPlugin::NoosferoHarvest def triplify_profiles total = environment.profiles.count count = 0 - environment.profiles.each do |profile| + environment.profiles.find_each do |profile| begin subject_identifier = url_for(profile.url) puts "triplify #{subject_identifier} profile (#{count+=1}/#{total})" -- libgit2 0.21.2