Commit 6639e83b8c8761c6617d75ef4e281046996a38a7
1 parent
8f4b2c3d
Exists in
master
and in
29 other branches
Avoiding reidexing to stop due to some problem with a index
Showing
1 changed file
with
9 additions
and
5 deletions
Show diff stats
vendor/plugins/acts_as_solr_reloaded/lib/acts_as_solr/class_methods.rb
@@ -235,11 +235,15 @@ module ActsAsSolr #:nodoc: | @@ -235,11 +235,15 @@ module ActsAsSolr #:nodoc: | ||
235 | iteration_start = Time.now | 235 | iteration_start = Time.now |
236 | 236 | ||
237 | iteration_items, iteration_add_batch = queue.pop(true) | 237 | iteration_items, iteration_add_batch = queue.pop(true) |
238 | - if options[:delayed_job] | ||
239 | - delay.solr_add iteration_add_batch | ||
240 | - else | ||
241 | - solr_add iteration_add_batch | ||
242 | - solr_commit | 238 | + begin |
239 | + if options[:delayed_job] | ||
240 | + delay.solr_add iteration_add_batch | ||
241 | + else | ||
242 | + solr_add iteration_add_batch | ||
243 | + solr_commit | ||
244 | + end | ||
245 | + rescue Exception => exception | ||
246 | + logger.error(exception.to_s) | ||
243 | end | 247 | end |
244 | 248 | ||
245 | last_id = iteration_items.last.id | 249 | last_id = iteration_items.last.id |