Merge lp:~achiang/laika/last_modified into lp:laika

Proposed by Alex Chiang
Status: Merged
Merged at revision: 14
Proposed branch: lp:~achiang/laika/last_modified
Merge into: lp:laika
Diff against target: 41 lines (+7/-3)
1 file modified
laika (+7/-3)
To merge this branch: bzr merge lp:~achiang/laika/last_modified
Reviewer Review Type Date Requested Status
Paul Hummer (community) Approve
Review via email: mp+40404@code.launchpad.net

Description of the change

Pass a 'last_modified' arg to searchTasks()

Limit our search for bugs within the user-specified window. This change
can improve our search performance by several hundred percent, reducing
a former 9 minute query down to 3 minutes and change, e.g.

To post a comment you must log in.
Revision history for this message
Paul Hummer (rockstar) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'laika'
2--- laika 2010-11-09 03:56:38 +0000
3+++ laika 2010-11-09 04:26:02 +0000
4@@ -43,6 +43,7 @@
5
6 self.user = self.launchpad.people[user]
7 self.window = window
8+ self.since = UTCNOW - datetime.timedelta(window)
9 self.ppas = ppas
10 self.status = ["New",
11 "Incomplete",
12@@ -95,7 +96,8 @@
13 'in_progress', 'triaged', 'confirmed', 'created']
14
15 tasks = self.user.searchTasks(assignee=self.user,
16- status=self.status)
17+ status=self.status,
18+ modified_since=self.since)
19 self.print_header("Assigned Bugs")
20
21 for t in tasks:
22@@ -120,7 +122,8 @@
23
24 def print_comments(self):
25 tasks = self.user.searchTasks(bug_commenter=self.user,
26- status=self.status)
27+ status=self.status,
28+ modified_since=self.since)
29 self.print_header("Commented Bugs")
30 for t in tasks:
31 if self.bugs.has_key(t.bug.id):
32@@ -136,7 +139,8 @@
33
34 def print_reported(self):
35 tasks = self.user.searchTasks(bug_reporter=self.user,
36- status=self.status)
37+ status=self.status,
38+ modified_since=self.since)
39 self.print_header("Reported Bugs")
40 for t in tasks:
41 if self.bugs.has_key(t.bug.id):

Subscribers

People subscribed via source and target branches

to all changes: