Commit ea914fbf authored by Carlos Garnacho's avatar Carlos Garnacho

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
parent e7be4210
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment