Merge lp:~robru/friends/limit-notifications into lp:friends
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Ken VanDine | ||||
Approved revision: | 192 | ||||
Merged at revision: | 195 | ||||
Proposed branch: | lp:~robru/friends/limit-notifications | ||||
Merge into: | lp:friends | ||||
Diff against target: |
113 lines (+33/-4) 2 files modified
friends/tests/test_notify.py (+24/-0) friends/utils/base.py (+9/-4) |
||||
To merge this branch: | bzr merge lp:~robru/friends/limit-notifications | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ken VanDine | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+158510@code.launchpad.net |
Commit message
Limit the rate and age of friends notifications.
Description of the change
I've taken a two-pronged approach at limiting notifications here.
The first is by preventing messages more than 5 days old from being notified. Lots of people were complaining about ancient messages being re-notified, so this should curb that. We might even want to consider making the limit less than 5 days, but I think this is a good choice for now and we can easily finesse it in future based on user feedback (if any).
Secondly, I also implement a global limit of 5 notifications per instance of friends-dispatcher. In practise this means that friends will never notify more than 5 times per refresh interval (which is 15 minutes by default). This value of 5 may also need finessing as well, but the point is that the infrastructure is now in place and it is easy to tweak as we see fit later on.
As usual, massive test coverage is included so we know for sure that these limitations are actually taking effect as expected.
PASSED: Continuous integration, rev:190 jenkins. qa.ubuntu. com/job/ friends- ci/27/ jenkins. qa.ubuntu. com/job/ friends- raring- amd64-ci/ 27
http://
Executed test runs:
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ friends- ci/27/rebuild
http://