[Kde-pim] Problem with bulk fetching of items with 4.8

Kevin Krammer kevin.krammer at gmx.at
Sun Jan 29 19:35:46 GMT 2012


On Sunday, 2012-01-29, Shaheed Haque wrote:
> Thanks for all the tips.
> 
> I've recoded things to use individual ItemCreateJobs, and including
> trying QMetaObject::invokeMethod() in place of scheduleCustomTask(),
> so while I think the structure is closer to what is being advised, I
> think I am missing something in terms of the exact behaviour of the
> jobs because I always get stuck at the end of the first batch, trying
> to update the collection attributes.
> 
> The design is now a nicely linear flow like this:
> 
> void ExGalResource::retrieveItems(const Akonadi::Collection &collection)
> {
> 		//scheduleCustomTask(this, "retrieveGALBatch", QVariant(),
> ResourceBase::Append);
> 		QMetaObject::invokeMethod(this, "retrieveGALBatch",
> Qt::QueuedConnection); cancelTask();

Hmm. I don't think you should cancel the task. I'd say either leave the task 
context active until you are done or call itemRetrievalDone().


> The problem is that this last slot updateGALStatusDone() is only
> invoked quite a few MINUTES after I expect, and with this output:

My guess is that you have not committed the transaction. Since the 
CollectionAttributesSynchronizationJob is not a child of the transaction but 
on the same session as the transaction, my guess is that it is queued to be 
executed after the transaction has completed.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20120129/ae11d29c/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list