[Nepomuk] Bugs, Patches and Scripts. - StrigiService & KInotify
Sebastian Trüg
trueg at kde.org
Thu May 6 20:16:12 CEST 2010
Hi Vishesh,
the simple things first:
How to block signals:
1. Use QObject::blockSignals()
2. Use a boolean variable like so:
if (!m_updatingConfig) {
m_updatingConfig = true;
updateConfig();
m_updatingConfig = false;
}
Now for the rest:
* There is no real need to optimize the folder list in the filewatch
service. StrigiServiceConfig already does that before giving the list to
the IndexScheduler.
* I think we need a better name than "restart". Maybe "ignore last
config change" or something like that.
* Any chance the config handling in IndexScheduler could be moved to
StrigiServiceConfig? Just so config handling is restricted to the one class.
* Now for the only critical use case: imagine filewatch changes the
config, then the kcm changes the folders, and only then strigi gets to
the config. I am not sure if that can even happen but if so strigi would
ignore the new config. But I suppose this is very unlikely to happen or
even impossible.
Apart from that I think the patch is very good.
Nice work. :)
Cheers,
Sebastian
On 05/05/2010 04:46 PM, Vishesh Handa wrote:
>
> Damn, this is a tricky one.
> How about a hacky solution: the file watch service does not update the
> config but writes a log of moved and watched folders.
> This log can be read by strigi after or before updating the index and
> then it can update its config itself without triggering a re-index.
>
>
> I was thinking somewhat the same thing except that I've added variable
> "restart" to the nepomukstrigiconfig.
>
> The patch works perfectly apart from one thing. In the
> IndexWriter::slotConfigChanged, I need to set the "restart" variable in
> the strigiconfig to true, if it is false. How do I do that without
> triggering the slotConfigChaged function ? I tried disconnected the slot
> and then later reconnecting it, but it didn't work! :-(
>
> I've modified the patch that if a folder who's parent is being watch is
> moved to a non-indexed location. It gets added to the indexed folders
> list. A slight problem that arises (which we can do nothing about unless
> inotify improves) is if the folder is moved to a non-watched location.
> Then the EvenMoveTo event doesn't occur, and we can't update its
> location in the strigi config or update its metadata.
>
> Is what I'm doing with the Regex obvious in
> FileWatch::handleStrigiIndexedFolder or should I add comments to explain?
>
> - Vishesh Handa
More information about the Nepomuk
mailing list