[Kde-pim] Re: Bug? CollectionFetchJob doesn't always work after AgentInstanceCreateJob

Volker Krause vkrause at kde.org
Mon May 16 08:02:23 BST 2011


On Sunday 15 May 2011 21:11:39 David Jarvie wrote:
> On Sunday 15 May 2011 20:53:55 Kevin Krammer wrote:
> > AgentInstance:reconfigure() is a D-Bus call from one process into
> > another so there is always some level of concurrency.
> > 
> > Most resources react to the reconfigure call by checking their current
> > config and when it makes sense requesting a synchronization of their
> > collection tree. Which involves yet another process (Akonadi server)
> > and is delayed (as in event loop processing continues right away).
> > 
> > So it is a matter of timing if the resource has had time to receive its
> > retrieveCollections call and answer it.
> > A CollectionFetchJob can therefore see any number of collections on that
> > resource, e.g. 0 if the call hasn't been processed yet, more but not all
> > if the retrieval is streamed but has not yet finished, or all.
> 
> Is there any way for the application to wait until the retrieveCollections
> call has completed? Or should it just keep retrying the CollectionFetchJob
> until it returns either a collection or an error?

There is Akonadi::ResourceSynchronizationJob, but as Kevin wrote already, it's 
not a perfect match for your use-case (it does slightly more than you need), 
but for new resources it's close enough I think.

regards
Volker
-------------- 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/20110516/6f3bf0a0/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