Merge lp:~ken-vandine/friends/lp1248143 into lp:friends

Proposed by Ken VanDine
Status: Merged
Approved by: Robert Bruce Park
Approved revision: 241
Merged at revision: 240
Proposed branch: lp:~ken-vandine/friends/lp1248143
Merge into: lp:friends
Diff against target: 48 lines (+6/-6)
2 files modified
data/com.canonical.friends.gschema.xml (+2/-2)
service/src/service.vala (+4/-4)
To merge this branch: bzr merge lp:~ken-vandine/friends/lp1248143
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Robert Bruce Park Approve
Review via email: mp+193990@code.launchpad.net

Commit message

Undo revert for the default polling frequency and ensure interval is set before using it in the timeout.

Description of the change

Undo revert for the default polling frequency and ensure interval is set before using it in the timeout.

To post a comment you must log in.
Revision history for this message
Robert Bruce Park (robru) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
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-11-05 12:17:33 +0000
3+++ data/com.canonical.friends.gschema.xml 2013-11-05 18:57:18 +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-11-05 12:17:33 +0000
19+++ service/src/service.vala 2013-11-05 18:57:18 +0000
20@@ -126,6 +126,9 @@
21 model.set_schema_full (SCHEMA);
22 }
23
24+ var settings = new Settings ("com.canonical.friends");
25+ settings.bind("interval", this, "interval", 0);
26+
27 if (model is Dee.Model)
28 {
29 debug ("Model with %u rows", model.get_n_rows());
30@@ -161,7 +164,7 @@
31 debug ("NOT LEADER");
32 });
33
34- Timeout.add_seconds (300, () => {
35+ Timeout.add_seconds (interval * 60, () => {
36 shared_model.flush_revision_queue();
37 debug ("Storing model with %u rows", model.get_n_rows());
38 resources.store ((Dee.SequenceModel)model, "com.canonical.Friends.Streams");
39@@ -169,9 +172,6 @@
40 });
41 }
42
43- var settings = new Settings ("com.canonical.friends");
44- settings.bind("interval", this, "interval", 0);
45-
46 Bus.get_proxy.begin<Dispatcher>(BusType.SESSION,
47 "com.canonical.Friends.Dispatcher",
48 "/com/canonical/friends/Dispatcher",

Subscribers

People subscribed via source and target branches

to all changes: