[tracker] TrackerDecorator: Make sure to flush remaining sparql updates when finished



commit 3dca87432adf986d0bbd14d076fec7d7c1e82396
Author: Xavier Claessens <xavier claessens collabora co uk>
Date:   Fri Feb 7 15:52:24 2014 -0500

    TrackerDecorator: Make sure to flush remaining sparql updates when finished
    
    Otherwise last extracted files will never be stored.

 src/libtracker-miner/tracker-decorator.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-decorator.c b/src/libtracker-miner/tracker-decorator.c
index 2b907bf..b3bf011 100644
--- a/src/libtracker-miner/tracker-decorator.c
+++ b/src/libtracker-miner/tracker-decorator.c
@@ -221,6 +221,9 @@ element_add (TrackerDecorator *decorator,
        }
 }
 
+
+static void decorator_commit_info (TrackerDecorator *decorator);
+
 static void
 element_remove_link (TrackerDecorator *decorator,
                      GList            *elem_link)
@@ -243,6 +246,9 @@ element_remove_link (TrackerDecorator *decorator,
        g_hash_table_remove (priv->elems, GINT_TO_POINTER (node->id));
 
        if (g_hash_table_size (priv->elems) == 0) {
+               /* Flush any remaining Sparql updates */
+               decorator_commit_info (decorator);
+
                g_signal_emit (decorator, signals[FINISHED], 0);
                decorator_update_state (decorator, "Idle", FALSE);
                priv->stats_n_elems = 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]