Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added exception rescue in case the texticle:create_indexes raketask f…

…ails.
  • Loading branch information...
commit 66e7bb23e51e28199cd0796727ba31f9bc55cb5e 1 parent 9303a2e
@ecin ecin authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/texticle/tasks.rb
View
6 lib/texticle/tasks.rb
@@ -35,7 +35,11 @@
ActiveRecord::Base.subclasses.each do |klass|
if klass.respond_to?(:full_text_indexes)
(klass.full_text_indexes || []).each do |fti|
- fti.create
+ begin
+ fti.create
+ rescue ActiveRecord::StatementInvalid => e
+ warn "WARNING: Couldn't create index for #{klass.to_s}, skipping..."
+ end
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.