diff --git a/lib/tire_async_index/workers/update_index.rb b/lib/tire_async_index/workers/update_index.rb index 75a7cb4..2e80b5b 100644 --- a/lib/tire_async_index/workers/update_index.rb +++ b/lib/tire_async_index/workers/update_index.rb @@ -17,10 +17,12 @@ def process(action_type, class_name, id) case action_type.to_sym when :update - object = klass.send(get_finder_method(klass), id) - - if object.present? && object.respond_to?(:tire) - object.tire.update_index + begin + object = klass.send(get_finder_method(klass), id) + if object.present? && object.respond_to?(:tire) + object.tire.update_index + end + rescue => e end when :delete