aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/crontab.ugly6
-rwxr-xr-xscript/update-xapian-index2
-rw-r--r--vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb2
3 files changed, 6 insertions, 4 deletions
diff --git a/config/crontab.ugly b/config/crontab.ugly
index f4aa09194..6690cce33 100644
--- a/config/crontab.ugly
+++ b/config/crontab.ugly
@@ -4,10 +4,12 @@
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org. WWW: http://www.mysociety.org/
#
-# $Id: crontab.ugly,v 1.22 2009-02-12 20:01:30 root Exp $
+# $Id: crontab.ugly,v 1.23 2009-04-08 11:36:30 louise Exp $
PATH=/usr/local/bin:/usr/bin:/bin
-MAILTO=team@whatdotheyknow.com
+# MAILTO=team@whatdotheyknow.com
+# Temporarily redirect output to Louise, as debugging update-xapian-index slowness
+MAILTO=louise@mysociety.org
# Every 10 minutes
*/10 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/update-xapian-index.lock /data/vhost/!!(*= $vhost *)!!/mysociety/foi/script/update-xapian-index || echo "stalled?"
diff --git a/script/update-xapian-index b/script/update-xapian-index
index 7f38fee80..72de02575 100755
--- a/script/update-xapian-index
+++ b/script/update-xapian-index
@@ -1,5 +1,5 @@
#!/bin/bash
cd `dirname $0`
-rake --silent xapian:update_index
+rake --silent verbose=true xapian:update_index
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 61ccdbead..852669ed8 100644
--- a/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb
+++ b/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb
@@ -533,7 +533,7 @@ module ActsAsXapian
STDOUT.puts("job with #{id} vanished under foot") if verbose
next
end
- STDOUT.puts("ActsAsXapian.update_index #{job.action} #{job.model} #{job.model_id.to_s}") if verbose
+ STDOUT.puts("ActsAsXapian.update_index #{job.action} #{job.model} #{job.model_id.to_s} #{Time.now.to_s}") if verbose
begin
if job.action == 'update'
# XXX Index functions may reference other models, so we could eager load here too?