Skip to content

Commit

Permalink
Merge pull request #1678 from mark-cooper/batch_tree_deletes
Browse files Browse the repository at this point in the history
Process tree node deletes in batches
  • Loading branch information
lmcglohon committed Oct 10, 2019
2 parents 8ffdb95 + 44e29ea commit 24e1ffd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion indexer/app/lib/pui_indexer.rb
Expand Up @@ -182,7 +182,9 @@ def index_round_complete(repository)
end

if tree_indexer.deletes.length > 0
delete_records(tree_indexer.deletes, :parent_id_field => 'pui_parent_id')
tree_indexer.deletes.each_slice(100) do |deletes|
delete_records(deletes, :parent_id_field => 'pui_parent_id')
end
end

handle_deletes(:parent_id_field => 'pui_parent_id')
Expand Down

0 comments on commit 24e1ffd

Please sign in to comment.