Skip to content

Commit

Permalink
make rubocop happy
Browse files Browse the repository at this point in the history
  • Loading branch information
jrochkind committed Mar 23, 2017
1 parent acdcf6f commit d173b3e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/active_fedora/indexing.rb
Expand Up @@ -89,16 +89,14 @@ def reindex_everything(batch_size: 50, softCommit: true, progress_bar: false)

batch = []

progress_bar_controller = if progress_bar
ProgressBar.create(:total => descendants.count, format: "%t: |%B| %p%% %e")
end
progress_bar_controller = ProgressBar.create(total: descendants.count, format: "%t: |%B| %p%% %e") if progress_bar

descendants.each do |uri|
logger.debug "Re-index everything ... #{uri}"

batch << ActiveFedora::Base.find(ActiveFedora::Base.uri_to_id(uri)).to_solr

if batch.count % batch_size == 0
if (batch.count % batch_size).zero?
SolrService.add(batch, softCommit: softCommit)
batch.clear
end
Expand Down

0 comments on commit d173b3e

Please sign in to comment.