Merge lp:~robru/friends/decrease-polling-frequency into lp:friends

Proposed by Robert Bruce Park
Status: Merged
Approved by: Robert Bruce Park
Approved revision: 235
Merged at revision: 235
Proposed branch: lp:~robru/friends/decrease-polling-frequency
Merge into: lp:friends
Diff against target: 28 lines (+3/-3)
2 files modified
data/com.canonical.friends.gschema.xml (+2/-2)
service/src/service.vala (+1/-1)
To merge this branch: bzr merge lp:~robru/friends/decrease-polling-frequency
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Ken VanDine Approve
Review via email: mp+193642@code.launchpad.net

Commit message

Save battery life by decreasing default polling frequency.

Description of the change

I noticed that we're flushing the revision queue every 5 minutes regardless of the actual polling frequency, which is a needless waste of disk activity. So I've tied the flushing to the refresh interval, and also decreased the default interval to 1 minute.

To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:235
http://jenkins.qa.ubuntu.com/job/friends-ci/54/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/friends-trusty-amd64-ci/2

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/friends-ci/54/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/com.canonical.friends.gschema.xml'
2--- data/com.canonical.friends.gschema.xml 2013-02-11 23:14:29 +0000
3+++ data/com.canonical.friends.gschema.xml 2013-11-01 17:46:54 +0000
4@@ -2,9 +2,9 @@
5 <schema id="com.canonical.friends" path="/com/canonical/friends/">
6
7 <key name="interval" type="i">
8- <default>15</default>
9+ <default>60</default>
10 <summary>Refresh interval in minutes.</summary>
11- <range min="5" max="30"/>
12+ <range min="15" max="600"/>
13 <description>
14 The number of minutes friends-service will wait in between
15 attempts at downloading new messages.
16
17=== modified file 'service/src/service.vala'
18--- service/src/service.vala 2013-08-21 19:12:09 +0000
19+++ service/src/service.vala 2013-11-01 17:46:54 +0000
20@@ -161,7 +161,7 @@
21 debug ("NOT LEADER");
22 });
23
24- Timeout.add_seconds (300, () => {
25+ Timeout.add_seconds (interval * 60, () => {
26 shared_model.flush_revision_queue();
27 debug ("Storing model with %u rows", model.get_n_rows());
28 resources.store ((Dee.SequenceModel)model, "com.canonical.Friends.Streams");

Subscribers

People subscribed via source and target branches