[tracker/decorator-memory-reduction: 3/3] tracker-miner-fs: Delete nie:dataSources on update
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/decorator-memory-reduction: 3/3] tracker-miner-fs: Delete nie:dataSources on update
- Date: Sun, 7 Dec 2014 22:16:06 +0000 (UTC)
commit 5c3ae89f3be314cadd0958ff0f958b39a868631f
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Dec 7 21:34:46 2014 +0100
tracker-miner-fs: Delete nie:dataSources on update
Decorators should be updating again all relevant information, so ensure
their nie:dataSource is deleted for these to kick in again.
This used to be unnecessary because updated items just went to the
internal decorator queue, without further checks. Now that the decorators
query the database for the next items missing that dataSource, it is
crucial to do this somewhere.
src/miners/fs/tracker-miner-files.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 246e7db..fb7445f 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -2322,6 +2322,18 @@ process_file_attributes_cb (GObject *object,
tracker_sparql_builder_graph_close (sparql);
tracker_sparql_builder_insert_close (sparql);
+ /* Delete data sources from other miners/decorators */
+ tracker_sparql_builder_delete_open (sparql, NULL);
+ tracker_sparql_builder_subject_iri (sparql, urn);
+ tracker_sparql_builder_predicate (sparql, "nie:dataSource");
+ tracker_sparql_builder_object_variable (sparql, "datasource");
+ tracker_sparql_builder_delete_close (sparql);
+ tracker_sparql_builder_where_open (sparql);
+ tracker_sparql_builder_subject_iri (sparql, urn);
+ tracker_sparql_builder_predicate (sparql, "nie:dataSource");
+ tracker_sparql_builder_object_variable (sparql, "datasource");
+ tracker_sparql_builder_where_close (sparql);
+
g_object_unref (file_info);
g_free (uri);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]