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

Shaheed Haque srhaque at theiet.org
Mon Jan 30 20:44:16 GMT 2012


Kevin,

It was indeed the failure to commit() the transaction that was the
problem! Anyway, now I need to think about if I need the transaction -
I'm not sure I do - but at least I'm now able to move forward.

Many thanks, Shaheed

2012/1/29 Kevin Krammer <kevin.krammer at gmx.at>:
> 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
>
> _______________________________________________
> 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/
_______________________________________________
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