Merge lp://staging/~gary/launchpad/bug741684-3 into lp://staging/launchpad
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Gary Poster | ||||||||
Approved revision: | no longer in the source branch. | ||||||||
Merged at revision: | 12733 | ||||||||
Proposed branch: | lp://staging/~gary/launchpad/bug741684-3 | ||||||||
Merge into: | lp://staging/launchpad | ||||||||
Diff against target: |
467 lines (+189/-115) 5 files modified
lib/lp/bugs/interfaces/bugnotification.py (+9/-3) lib/lp/bugs/model/bugnotification.py (+61/-10) lib/lp/bugs/scripts/bugnotification.py (+31/-41) lib/lp/bugs/scripts/tests/test_bugnotification.py (+4/-3) lib/lp/bugs/tests/test_bugnotification.py (+84/-58) |
||||||||
To merge this branch: | bzr merge lp://staging/~gary/launchpad/bug741684-3 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email:
|
Commit message
[r=bac][bug=741684,742230] Further optimize the notification script code.
Description of the change
This branch changes how we get filter information for each email recipient one more time. Now, instead of making a query per subscription source, we make a single query for an entire batched set of notifications. We then assemble the data into the structure we actually want per recipient.
Part of the structure of the new method, and how it is used, is coming from the fact that I'm preparing to add additional functionality to it in a db-devel branch, but I think it stands up well enough on its own.
Almost all the code in this branch is about that change, either directly or indirectly (tests).
The only exception is that lib/lp/
I would have preferred to have getRecipientFil
Thank you!
Gary this branch looks good. On IRC we discussed the oddity of the bare assert statement in your test. Please either put in a comment explaining why it is there or change it to self.assertEqual.