Single file ical resources: support batch item retrieval API
4 years ago akonadi@81652601 introduced the batch variant of resource retrieval. I am curious to see that the resource templates and some resources still only support the single item retrieval variant, Is there a reason for that?
If not, this patch should be the start of a series to port the remaining ones.
Questions:
- Return any items if a single has an issue?
The current default implementation of bool ResourceBase::retrieveItem(const Akonadi::Item &item, const QSet<QByteArray> &parts)
starts a job per item. If one job fails, that will not cancel the other jobs, right?
Edit: seemw wrong, ResourceScheduler::Task::sendDBusReplies(const QString &errorMsg)
seems to deliver the error then for all existing single jobs.
The Knut resource implementation proposes to cancel the complete retrieval on an issue. What is the best behaviour here? Current patch now also on any issues cancels the whole task. Npt sure though if perhaps an idea might be that getting some data on a glitch might be better then getting none at all?
- KAlarm broken for me
I could not test the KAlarm change though, as the resource has not been working for me before and after the change, and I have yet to debug things to get more clue. The code change itself should be proper in theory, as it does the same as with the normal ical file, wrapping the code for a single item in a loop. ((BTW, also surprised that the config wants me to add path to the file/dir, instead of using the default KAlarm storage. Current KAlarm itself seems to not have an option to change the storage, and how would average Sue User know that path? Would a patch make sense to just hardcode the dirs?))