summaryrefslogtreecommitdiffstats
path: root/common/synchronizer.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-01-18 16:02:40 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-01-18 16:02:40 +0100
commit4983c40b580a2421c9be43760e6a8bebdb156ef3 (patch)
tree822416b239d0c1f702c88bc11d98a75a45a1e537 /common/synchronizer.cpp
parent62d222f20de7558ebb266efdcadf458e3807e406 (diff)
downloadsink-4983c40b580a2421c9be43760e6a8bebdb156ef3.tar.gz
sink-4983c40b580a2421c9be43760e6a8bebdb156ef3.zip
Debug output
Diffstat (limited to 'common/synchronizer.cpp')
-rw-r--r--common/synchronizer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp
index d86b027..d94083b 100644
--- a/common/synchronizer.cpp
+++ b/common/synchronizer.cpp
@@ -277,6 +277,7 @@ void Synchronizer::flush(int commandId, const QByteArray &flushId)
277KAsync::Job<void> Synchronizer::processSyncQueue() 277KAsync::Job<void> Synchronizer::processSyncQueue()
278{ 278{
279 if (mSyncRequestQueue.isEmpty() || mSyncInProgress) { 279 if (mSyncRequestQueue.isEmpty() || mSyncInProgress) {
280 SinkTrace() << "Sync still in progress or nothing to do.";
280 return KAsync::null<void>(); 281 return KAsync::null<void>();
281 } 282 }
282 283
@@ -285,7 +286,7 @@ KAsync::Job<void> Synchronizer::processSyncQueue()
285 mSyncInProgress = true; 286 mSyncInProgress = true;
286 }); 287 });
287 while (!mSyncRequestQueue.isEmpty()) { 288 while (!mSyncRequestQueue.isEmpty()) {
288 auto request = mSyncRequestQueue.takeFirst(); 289 const auto request = mSyncRequestQueue.takeFirst();
289 if (request.requestType == Synchronizer::SyncRequest::Synchronization) { 290 if (request.requestType == Synchronizer::SyncRequest::Synchronization) {
290 job = job.then([this, request] { 291 job = job.then([this, request] {
291 Sink::Notification n; 292 Sink::Notification n;
@@ -343,6 +344,7 @@ KAsync::Job<void> Synchronizer::processSyncQueue()
343 } 344 }
344 } 345 }
345 return job.then<void>([this](const KAsync::Error &error) { 346 return job.then<void>([this](const KAsync::Error &error) {
347 SinkTrace() << "Sync request processed";
346 mSyncTransaction.abort(); 348 mSyncTransaction.abort();
347 mMessageQueue->commit(); 349 mMessageQueue->commit();
348 mSyncStore.clear(); 350 mSyncStore.clear();
@@ -446,6 +448,8 @@ KAsync::Job<void> Synchronizer::replay(const QByteArray &type, const QByteArray
446 } else if (type == ApplicationDomain::getTypeName<ApplicationDomain::Mail>()) { 448 } else if (type == ApplicationDomain::getTypeName<ApplicationDomain::Mail>()) {
447 auto mail = store().readEntity<ApplicationDomain::Mail>(key); 449 auto mail = store().readEntity<ApplicationDomain::Mail>(key);
448 job = replay(mail, operation, oldRemoteId, modifiedProperties); 450 job = replay(mail, operation, oldRemoteId, modifiedProperties);
451 } else {
452 SinkError() << "Replayed unknown type: " << type;
449 } 453 }
450 454
451 return job.then([this, operation, type, uid, oldRemoteId](const QByteArray &remoteId) { 455 return job.then([this, operation, type, uid, oldRemoteId](const QByteArray &remoteId) {