aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrancis <francis>2009-01-26 12:19:18 +0000
committerfrancis <francis>2009-01-26 12:19:18 +0000
commit79aca31c5b9457edcd7f523b6be4ff77a2b14854 (patch)
tree0f69f9159efa1b999eeffdea9906528af2afe043
parent531cb4b5e770935b4216c25713530b33a21cd442 (diff)
Show model error was in
-rw-r--r--vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb6
1 files changed, 2 insertions, 4 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 f776fe7c9..a6b636bb7 100644
--- a/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb
+++ b/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb
@@ -512,6 +512,7 @@ module ActsAsXapian
ids_to_refresh = ActsAsXapianJob.find(:all).map() { |i| i.id }
for id in ids_to_refresh
+ job = nil
begin
ActiveRecord::Base.transaction do
begin
@@ -551,10 +552,7 @@ module ActsAsXapian
end
rescue => detail
# print any error, and carry on so other things are indexed
- # XXX If item is later deleted, this should give up, and it
- # won't. It will keep trying (assuming update_index called from
- # regular cron job) and mayhap cause trouble.
- STDERR.puts(detail.backtrace.join("\n") + "\nFAILED ActsAsXapian.update_index job #{id} #{$!}")
+ STDERR.puts(detail.backtrace.join("\n") + "\nFAILED ActsAsXapian.update_index job #{id} #{$!} " + (job.nil? ? "" : "model " + job.model + " id " + job.model_id.to_s))
end
end
end