[tracker/rss-enclosures] libtracker-miner: Don't report processing or percentage change until crawling is finished
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] libtracker-miner: Don't report processing or percentage change until crawling is finished
- Date: Wed, 24 Nov 2010 02:07:44 +0000 (UTC)
commit 5435fea920a16f5266269d86767dcbcdc612293e
Author: Aleksander Morgado <aleksander lanedo com>
Date: Thu Oct 21 15:50:58 2010 +0200
libtracker-miner: Don't report processing or percentage change until crawling is finished
src/libtracker-miner/tracker-miner-fs.c | 44 +++++++++++++++++++++++-------
1 files changed, 33 insertions(+), 11 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index da42f92..e077a86 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -2434,11 +2434,31 @@ item_queue_handlers_cb (gpointer user_data)
time_last = time_now;
- /* Update progress */
+ /* Update progress? */
progress_now = item_queue_get_progress (fs,
&items_processed,
&items_remaining);
- g_object_set (fs, "progress", progress_now, NULL);
+
+ if (!fs->private->is_crawling) {
+ gchar *status;
+
+ g_object_get (fs, "status", &status, NULL);
+
+ if (g_strcmp0 (status, "Processingâ?¦") != 0) {
+ /* Don't spam this */
+ g_message ("Processingâ?¦");
+ g_object_set (fs,
+ "status", "Processingâ?¦",
+ "progress", progress_now,
+ NULL);
+ } else {
+ g_object_set (fs,
+ "progress", progress_now,
+ NULL);
+ }
+
+ g_free (status);
+ }
if (++info_last >= 5 &&
(gint) (progress_last * 100) != (gint) (progress_now * 100)) {
@@ -2535,8 +2555,6 @@ _tracker_idle_add (TrackerMinerFS *fs,
static void
item_queue_handlers_set_up (TrackerMinerFS *fs)
{
- gchar *status;
-
if (fs->private->item_queues_handler_id != 0) {
return;
}
@@ -2550,15 +2568,19 @@ item_queue_handlers_set_up (TrackerMinerFS *fs)
return;
}
- g_object_get (fs, "status", &status, NULL);
+ if (!fs->private->is_crawling) {
+ gchar *status;
- if (g_strcmp0 (status, "Processingâ?¦") != 0) {
- /* Don't spam this */
- g_message ("Processingâ?¦");
- g_object_set (fs, "status", "Processingâ?¦", NULL);
- }
+ g_object_get (fs, "status", &status, NULL);
- g_free (status);
+ if (g_strcmp0 (status, "Processingâ?¦") != 0) {
+ /* Don't spam this */
+ g_message ("Processingâ?¦");
+ g_object_set (fs, "status", "Processingâ?¦", NULL);
+ }
+
+ g_free (status);
+ }
fs->private->item_queues_handler_id =
_tracker_idle_add (fs,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]