diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-20 01:24:17 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-20 01:24:17 +0200 |
commit | 703b72511488068bdbc5e81172e674d0f07349ed (patch) | |
tree | 8fad8483c02bce7210401dd128cd1473c530d8d0 /examples/maildirresource/maildirresource.cpp | |
parent | b10ca588b7a8a5e3bec22b9e683b4a4dbd5bc889 (diff) | |
download | sink-703b72511488068bdbc5e81172e674d0f07349ed.tar.gz sink-703b72511488068bdbc5e81172e674d0f07349ed.zip |
Commit all databases in the same interval
Diffstat (limited to 'examples/maildirresource/maildirresource.cpp')
-rw-r--r-- | examples/maildirresource/maildirresource.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/examples/maildirresource/maildirresource.cpp b/examples/maildirresource/maildirresource.cpp index 5fa7084..23e25c4 100644 --- a/examples/maildirresource/maildirresource.cpp +++ b/examples/maildirresource/maildirresource.cpp | |||
@@ -393,7 +393,6 @@ public: | |||
393 | 393 | ||
394 | createOrModify(bufferType, remoteId, mail); | 394 | createOrModify(bufferType, remoteId, mail); |
395 | } | 395 | } |
396 | commitSync(); | ||
397 | const auto elapsed = time->elapsed(); | 396 | const auto elapsed = time->elapsed(); |
398 | Log() << "Synchronized " << count << " mails in " << listingPath << Sink::Log::TraceTime(elapsed) << " " << elapsed/qMax(count, 1) << " [ms/mail]"; | 397 | Log() << "Synchronized " << count << " mails in " << listingPath << Sink::Log::TraceTime(elapsed) << " " << elapsed/qMax(count, 1) << " [ms/mail]"; |
399 | } | 398 | } |
@@ -409,12 +408,10 @@ public: | |||
409 | synchronizeFolders(); | 408 | synchronizeFolders(); |
410 | //The next sync needs the folders available | 409 | //The next sync needs the folders available |
411 | commit(); | 410 | commit(); |
412 | commitSync(); | ||
413 | for (const auto &folder : listAvailableFolders()) { | 411 | for (const auto &folder : listAvailableFolders()) { |
414 | synchronizeMails(folder); | 412 | synchronizeMails(folder); |
415 | //Don't let the transaction grow too much | 413 | //Don't let the transaction grow too much |
416 | commit(); | 414 | commit(); |
417 | commitSync(); | ||
418 | } | 415 | } |
419 | Log() << "Done Synchronizing"; | 416 | Log() << "Done Synchronizing"; |
420 | return KAsync::null<void>(); | 417 | return KAsync::null<void>(); |
@@ -515,7 +512,6 @@ MaildirResource::MaildirResource(const QByteArray &instanceIdentifier, const QSh | |||
515 | auto remoteId = synchronizer->createFolder(mDraftsFolder, "folder", QByteArrayList() << "drafts"); | 512 | auto remoteId = synchronizer->createFolder(mDraftsFolder, "folder", QByteArrayList() << "drafts"); |
516 | auto draftsFolderLocalId = synchronizer->syncStore().resolveRemoteId(ENTITY_TYPE_FOLDER, remoteId); | 513 | auto draftsFolderLocalId = synchronizer->syncStore().resolveRemoteId(ENTITY_TYPE_FOLDER, remoteId); |
517 | synchronizer->commit(); | 514 | synchronizer->commit(); |
518 | synchronizer->commitSync(); | ||
519 | 515 | ||
520 | folderUpdater->mDraftsFolder = draftsFolderLocalId; | 516 | folderUpdater->mDraftsFolder = draftsFolderLocalId; |
521 | folderUpdater->mResourceInstanceIdentifier = mResourceInstanceIdentifier; | 517 | folderUpdater->mResourceInstanceIdentifier = mResourceInstanceIdentifier; |