[tracker/failsafe-extraction-0.10] libtracker-miner: don't put sparql for missing/cancelled files
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/failsafe-extraction-0.10] libtracker-miner: don't put sparql for missing/cancelled files
- Date: Mon, 19 Dec 2011 11:02:41 +0000 (UTC)
commit ea914fbfee0c2f42a10e86928115a29a084beb56
Author: Carlos Garnacho <carlos lanedo com>
Date: Mon Dec 19 11:37:31 2011 +0100
libtracker-miner: don't put sparql for missing/cancelled files
This behavior is analogous to 0.10. The miner has to allow lesser
errors and insert minimal sparql for the files, but this kind of
errors must not trigger sparql insertion.
Conflicts:
src/libtracker-miner/tracker-miner-fs.c
src/libtracker-miner/tracker-miner-fs.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 5065eb8..92a8443 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1892,7 +1892,7 @@ item_add_or_update_cb (TrackerMinerFS *fs,
const GError *error)
{
UpdateProcessingTaskContext *ctxt;
- TrackerTask *sparql_task;
+ TrackerTask *sparql_task = NULL;
GFile *task_file;
gchar *uri;
@@ -1906,7 +1906,12 @@ item_add_or_update_cb (TrackerMinerFS *fs,
g_message ("Could not process '%s': %s", uri, error->message);
fs->priv->total_files_notified_error++;
- item_queue_handlers_set_up (fs);
+
+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND) &&
+ !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ sparql_task = tracker_sparql_task_new_with_sparql (task_file,
+ ctxt->builder);
+ }
} else {
if (ctxt->urn) {
gboolean attribute_update_only;
@@ -1961,16 +1966,18 @@ item_add_or_update_cb (TrackerMinerFS *fs,
g_debug ("Creating new item '%s'", uri);
sparql_task = tracker_sparql_task_new_with_sparql (task_file, ctxt->builder);
}
+ }
+ if (sparql_task) {
tracker_sparql_buffer_push (fs->priv->sparql_buffer,
sparql_task,
ctxt->priority,
sparql_buffer_task_finished_cb,
fs);
+ }
- if (!tracker_task_pool_limit_reached (TRACKER_TASK_POOL (fs->priv->sparql_buffer))) {
- item_queue_handlers_set_up (fs);
- }
+ if (!tracker_task_pool_limit_reached (TRACKER_TASK_POOL (fs->priv->sparql_buffer))) {
+ item_queue_handlers_set_up (fs);
}
tracker_task_unref (extraction_task);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]