Merge lp:~renatofilho/sync-monitor/calendar-start-date into lp:sync-monitor

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Bill Filler
Approved revision: 42
Merged at revision: 42
Proposed branch: lp:~renatofilho/sync-monitor/calendar-start-date
Merge into: lp:sync-monitor
Diff against target: 34 lines (+9/-0)
1 file modified
src/sync-configure.cpp (+9/-0)
To merge this branch: bzr merge lp:~renatofilho/sync-monitor/calendar-start-date
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+242082@code.launchpad.net

Commit message

Use the new "syncInterval" filter to limit the number of events retrieved on the first calendar sync.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
42. By Renato Araujo Oliveira Filho

Used "syncInterval" instead of "startDate" for calendar sync filter.

Use 90 days as interval.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/sync-configure.cpp'
2--- src/sync-configure.cpp 2014-04-15 22:20:40 +0000
3+++ src/sync-configure.cpp 2014-11-20 19:03:27 +0000
4@@ -162,14 +162,22 @@
5 config[""]["maxlogdirs"] = "2";
6
7 QString expectedSource;
8+ bool isCalendar = false;
9 if (serviceName == CONTACTS_SERVICE_NAME) {
10 expectedSource = QString("source/addressbook");
11 } else if (serviceName == CALENDAR_SERVICE_NAME) {
12+ isCalendar = true;
13 expectedSource = QString("source/calendar");
14 } else {
15 expectedSource = QString("source/%1").arg(serviceName);
16 }
17
18+ if (isCalendar) {
19+ // limit the number of retrieve events to optimize the initial query
20+ // 3 months before
21+ config[expectedSource]["syncInterval"] = "90";
22+ }
23+
24 bool result = session->saveConfig(targetName, config);
25 if (!result) {
26 qWarning() << "Fail to save account client config";
27@@ -238,6 +246,7 @@
28
29 config[sourceFullName]["sync"] = syncMode;
30
31+
32 bool result = session->saveConfig(targetName, config);
33 if (!result) {
34 qWarning() << "Fail to save account client config";

Subscribers

People subscribed via source and target branches