[Tracker] Mining completed notifications for removable devices



Hi all

I've been working on some code this week to add a 'DeviceComplete'
signal to the FS miner, which will emit a signal when the crawling of
a specific removable device has been complete.

I'll push the branch next week, after tidying it up a bit, but I
thought I'd mention it now - in part because I'm aware Felipe is doing
some work on removable devices as well and I want to make sure we stay
coordinated !

The use case is simple; you want to update a UI with all the data a
removable device contains, as soon as it's available. It's possible to
do it gradually with GraphUpdated as the data appears, but in practice
this is going to hammer DBus and the UI code and it's nice to be able
to just query everything once it's available instead.

I've seen people connecting to Miner.Progress to get the status of USB
crawling, and I don't think I need to explain why this is so nasty.

Internally, it's implemented by associating each GFile with its mount,
and keeping a counter on the mount of how many files have been
processed. It might not sound nice but it's working pretty well in
practice :) Associating the mount with the GFile also allows us to
remove things from the processing queues right away when they are on a
USB that has been removed, instead of waiting for extraction errors
and logging lots of errors.

Thanks for your comments
Sam



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]