[tracker/libtracker-miner] TrackerMinerFS: Use tracker_miner_commit() explicitly.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/libtracker-miner] TrackerMinerFS: Use tracker_miner_commit() explicitly.
- Date: Mon, 31 Aug 2009 15:52:14 +0000 (UTC)
commit 6dc2b9b47d225caf6adca6399518a8c207f3a5fe
Author: Carlos Garnacho <carlos lanedo com>
Date: Mon Aug 31 17:40:25 2009 +0200
TrackerMinerFS: Use tracker_miner_commit() explicitly.
For initial crawling, it will wait until it's completely done. After that,
any sparql additions will trigger a commit.
src/libtracker-miner/tracker-miner-fs.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index fd327f8..8af3b77 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -428,6 +428,8 @@ process_stop (TrackerMinerFS *fs)
/* Now we have finished crawling, print stats and enable monitor events */
process_print_stats (fs);
+ tracker_miner_commit (TRACKER_MINER (fs));
+
g_message ("Idle");
g_object_set (fs,
@@ -502,6 +504,13 @@ item_add_or_update_cb (TrackerMinerFS *fs,
tracker_miner_execute_sparql (TRACKER_MINER (fs), full_sparql, NULL);
g_free (full_sparql);
+
+ if (fs->private->been_crawled) {
+ /* Only commit immediately for
+ * changes after initial crawling.
+ */
+ tracker_miner_commit (TRACKER_MINER (fs));
+ }
}
if (fs->private->cancellable) {
@@ -847,6 +856,13 @@ item_queue_handlers_cb (gpointer user_data)
fs->private->item_queues_handler_id = 0;
return FALSE;
} else {
+ if (fs->private->been_crawled) {
+ /* Only commit immediately for
+ * changes after initial crawling.
+ */
+ tracker_miner_commit (TRACKER_MINER (fs));
+ }
+
return TRUE;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]