Improved memory management on many objects.

This commit is contained in:
Martin Edenhofer 2014-12-09 20:11:25 +01:00
parent a83c4e99a9
commit 5852bcb142

View file

@ -550,7 +550,9 @@ reload search index with full data
def self.search_index_reload
return if !@search_index_support_config
self.all.order('created_at DESC').each { |item|
all_ids = self.select('id').all.order('created_at DESC')
all_ids.each { |item_with_id|
item = self.find( item_with_id.id )
item.search_index_update_backend
}
end