[tracker] libtracker-miner: Skip IgnoreNextUpdate requests on CREATED events
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-miner: Skip IgnoreNextUpdate requests on CREATED events
- Date: Tue, 21 Dec 2010 14:19:51 +0000 (UTC)
commit 92a5bf9495f90c8a4508a808ee30a516ab070a87
Author: Aleksander Morgado <aleksander lanedo com>
Date: Tue Dec 21 14:57:46 2010 +0100
libtracker-miner: Skip IgnoreNextUpdate requests on CREATED events
src/libtracker-miner/tracker-miner-fs.c | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 2cd48ec..d67639e 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -2324,10 +2324,22 @@ item_queue_get_next_file (TrackerMinerFS *fs,
/* Created items next */
queue_file = g_queue_pop_head (fs->private->items_created);
if (queue_file) {
+ /* Note:
+ * We won't be considering an IgnoreNextUpdate request if
+ * the event being processed is a CREATED event. This is a fast
+ * and dirty solution for the situation where tracker-writeback
+ * sends an IgnoreNextUpdate event and miner-fs had never indexed
+ * the file before.
+ */
if (check_ignore_next_update (fs, queue_file)) {
- *file = NULL;
- *source_file = queue_file;
- return QUEUE_IGNORE_NEXT_UPDATE;
+ gchar *uri;
+
+ /* Just remove the IgnoreNextUpdate request */
+ uri = g_file_get_uri (queue_file);
+ g_message ("Skipping the IgnoreNextUpdate request on CREATED event for '%s'",
+ uri);
+ g_hash_table_remove (fs->private->items_ignore_next_update, uri);
+ g_free (uri);
}
/* If the same item OR its first parent is currently being processed,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]