aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2010-06-10 11:28:55 +0100
committerFrancis Irving <francis@mysociety.org>2010-06-10 11:28:55 +0100
commit8461b9fd374f715e08ba5d7ed63af2f015a8b134 (patch)
tree9ddb6cfe8756d4f8f77c4a72399aff6bc4263a6a
parent8a22601535bd2777ba43eeb9843896cf09e33377 (diff)
Only use last 100 finds, not 200
-rw-r--r--app/models/track_mailer.rb2
-rw-r--r--spec/models/track_mailer_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/track_mailer.rb b/app/models/track_mailer.rb
index cac2ab287..6c9d9949b 100644
--- a/app/models/track_mailer.rb
+++ b/app/models/track_mailer.rb
@@ -58,7 +58,7 @@ class TrackMailer < ApplicationMailer
# Query for things in this track. We use described_at for the
# ordering, so we catch anything new (before described), or
# anything whose new status has been described.
- xapian_object = InfoRequest.full_search([InfoRequestEvent], track_thing.track_query, 'described_at', true, nil, 200, 1)
+ xapian_object = InfoRequest.full_search([InfoRequestEvent], track_thing.track_query, 'described_at', true, nil, 100, 1)
# Go through looking for unalerted things
alert_results = []
for result in xapian_object.results
diff --git a/spec/models/track_mailer_spec.rb b/spec/models/track_mailer_spec.rb
index 06f250a34..44619e2bb 100644
--- a/spec/models/track_mailer_spec.rb
+++ b/spec/models/track_mailer_spec.rb
@@ -61,7 +61,7 @@ describe TrackMailer do
end
it 'should ask for the events returned by the tracking query' do
- InfoRequest.should_receive(:full_search).with([InfoRequestEvent], 'test query', 'described_at', true, nil, 200, 1).and_return(@xapian_search)
+ InfoRequest.should_receive(:full_search).with([InfoRequestEvent], 'test query', 'described_at', true, nil, 100, 1).and_return(@xapian_search)
TrackMailer.alert_tracks
end