diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-01-09 08:05:47 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-01-09 08:05:47 +0000 |
commit | 2b004319e0c6b67c7a3649a0c7954be223f7f282 (patch) | |
tree | 2b6a59865718f21687d612c8fa4c489bb253392c | |
parent | 7149758430e4192487433a6c13483e9a8b1df261 (diff) |
Ensure xapian database is always created before starting index update
-rw-r--r-- | vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb b/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb index 512f59f97..33ad70d5f 100644 --- a/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb +++ b/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb @@ -525,6 +525,7 @@ module ActsAsXapian # If there are no models in the queue, then nothing to do return if model_classes.size == 0 + ActsAsXapian.writable_init # Abort if full rebuild is going on new_path = ActsAsXapian.db_path + ".new" if File.exist?(new_path) @@ -532,7 +533,6 @@ module ActsAsXapian end ids_to_refresh = ActsAsXapianJob.find(:all).map() { |i| i.id } - ActsAsXapian.writable_init for id in ids_to_refresh job = nil begin |