[Kde-pim] Question: Akonadi::TransactionSequence

Kevin Krammer kevin.krammer at gmx.at
Wed Jan 23 14:56:58 GMT 2008


Hi all,

yesterday I imported a KABC resource implemented using Akonadi as its storage
http://websvn.kde.org/trunk/playground/pim/akonadi-kres/kabc/

One of the issues of the initially imported version is that Resource::save() 
has basically been implemented as a series of job creating + job->exec().

To improve this and to also get a proper asyncSave() implementation, I looked 
through libakonadi for job chaining and found TransactionSequence.

I created an internal  subclass called SaveSequence and add the ItemDeleteJob, 
ItemStoreJob and ItemAppendJob to it before either executing it using exec() 
(for the synchronous save() method) or start() (for the asyncSave() method).

However, while testing, I got an error logging from Akonadi::Session (added 
the current job to the output):

Akonadi::SessionPrivate::jobDone: Akonadi::ItemDeleteJob(0x81049f8) 
Non-current job finished. Current Akonadi::TransactionSequence(0x8131d20)

My guess is that I am not using the TransactionSequence correctly or using it 
for a job it wasn't intended for.

Current version of the resource in SVN contains both implementations, one 
needs to uncomment the define around line 209 to implement the sequence based 
one.

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: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080123/44443a47/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