tracker r2002 - in branches/indexer-split: . src/tracker-indexer src/trackerd
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2002 - in branches/indexer-split: . src/tracker-indexer src/trackerd
- Date: Tue, 5 Aug 2008 13:03:51 +0000 (UTC)
Author: mr
Date: Tue Aug 5 13:03:51 2008
New Revision: 2002
URL: http://svn.gnome.org/viewvc/tracker?rev=2002&view=rev
Log:
* src/tracker-indexer/tracker-main.c: Make sure we don't just exit
when we have processed items. ALWAYS wait at least 10 seconds
before quitting after EVERY "finished" signal. The indexer was
being started/stopped constantly for small monitor event groups.
Now it runs constantly.
* src/trackerd/tracker-monitor.c: Make some of the logging debug
level so we don't spam the console so much.
* src/trackerd/tracker-processor.c: Set state as indexing in the
queue handler callback.
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/tracker-indexer/tracker-main.c
branches/indexer-split/src/trackerd/tracker-monitor.c
branches/indexer-split/src/trackerd/tracker-processor.c
Modified: branches/indexer-split/src/tracker-indexer/tracker-main.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-main.c (original)
+++ branches/indexer-split/src/tracker-indexer/tracker-main.c Tue Aug 5 13:03:51 2008
@@ -201,19 +201,18 @@
static void
indexer_finished_cb (TrackerIndexer *indexer,
- gdouble seconds_elapsed,
- guint items_indexed,
- gpointer user_data)
+ gdouble seconds_elapsed,
+ guint items_indexed,
+ gpointer user_data)
{
- if (items_indexed > 0) {
- g_main_loop_quit (main_loop);
- return;
+ g_message ("Finished indexing sent items");
+
+ if (quit_timeout_id) {
+ g_message ("Cancelling previous quit timeout");
+ g_source_remove (quit_timeout_id);
}
- /* If we didn't index anything yet, wait for a minimum of 10
- * seconds or so before quitting.
- */
- g_message ("Nothing was indexed, waiting %d seconds before quitting...",
+ g_message ("Waiting another %d seconds for more items before quitting...",
QUIT_TIMEOUT);
quit_timeout_id = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT,
Modified: branches/indexer-split/src/trackerd/tracker-monitor.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-monitor.c (original)
+++ branches/indexer-split/src/trackerd/tracker-monitor.c Tue Aug 5 13:03:51 2008
@@ -486,7 +486,7 @@
}
path = g_file_get_path (key);
- g_message ("Removing '%s' from black list count", path);
+ g_debug ("Removing '%s' from black list count", path);
g_free (path);
/* Only signal if count >= BLACK_LIST_MAX_HITS, since
@@ -528,7 +528,7 @@
* timeout again when we need it instead.
*/
if (g_hash_table_size (monitor->private->black_list_count) < 1) {
- g_message ("No further items on the black list, removing check timeout");
+ g_debug ("No further items on the black list, removing check timeout");
monitor->private->black_list_timeout_id = 0;
return FALSE;
}
@@ -582,10 +582,10 @@
}
path = g_file_get_path (file);
- g_message ("Adding '%s' to black list count:%d (MAX is %d)",
- path,
- count,
- BLACK_LIST_MAX_HITS);
+ g_debug ("Adding '%s' to black list count:%d (MAX is %d)",
+ path,
+ count,
+ BLACK_LIST_MAX_HITS);
g_free (path);
}
Modified: branches/indexer-split/src/trackerd/tracker-processor.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-processor.c (original)
+++ branches/indexer-split/src/trackerd/tracker-processor.c Tue Aug 5 13:03:51 2008
@@ -549,6 +549,9 @@
processor = user_data;
+ /* Now we try to send items to the indexer */
+ tracker_status_set_and_signal (TRACKER_STATUS_INDEXING);
+
/* This is here so we don't try to send something if we are
* still waiting for a response from the last send.
*/
@@ -646,9 +649,6 @@
return;
}
- /* Now we try to send all items to the indexer */
- tracker_status_set_and_signal (TRACKER_STATUS_INDEXING);
-
processor->private->item_queues_handler_id =
g_timeout_add (ITEMS_QUEUE_PROCESS_INTERVAL,
item_queue_handlers_cb,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]