[tracker/wip/carlosg/sparql1.1: 32/56] sm attach databases
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/sparql1.1: 32/56] sm attach databases
- Date: Thu, 6 Jun 2019 11:18:51 +0000 (UTC)
commit d4e74ced140bfdaca66d93ffaddedcd25b626ce0
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu May 30 12:10:38 2019 +0200
sm attach databases
src/libtracker-data/tracker-data-manager.c | 42 +++++++++++++++---------------
1 file changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index e3cb317f4..3eeacfc24 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -4076,11 +4076,32 @@ setup_interface_cb (TrackerDBManager *db_manager,
TrackerDBInterface *iface,
TrackerDataManager *data_manager)
{
+ GHashTable *graphs;
GError *error = NULL;
#if HAVE_TRACKER_FTS
tracker_data_manager_init_fts (iface, FALSE);
#endif
+ graphs = tracker_data_manager_get_graphs (data_manager, iface, NULL);
+
+ if (graphs) {
+ GHashTableIter iter;
+ gpointer value;
+ GError *error = NULL;
+
+ g_hash_table_iter_init (&iter, graphs);
+
+ while (g_hash_table_iter_next (&iter, &value, NULL)) {
+ if (!tracker_db_manager_attach_database (db_manager,
+ iface, value, FALSE,
+ &error)) {
+ g_critical ("Could not attach database '%s': %s\n",
+ (gchar *) value, error->message);
+ g_clear_error (&error);
+ continue;
+ }
+ }
+ }
if (!tracker_data_manager_update_union_views (data_manager, iface, &error)) {
g_critical ("Could not update union views: %s\n", error->message);
@@ -4680,27 +4701,6 @@ tracker_data_manager_initable_init (GInitable *initable,
}
}
- graphs = tracker_data_manager_get_graphs (manager, iface, &internal_error);
-
- if (graphs) {
- GHashTableIter iter;
- gpointer value;
-
- g_hash_table_iter_init (&iter, graphs);
-
- while (g_hash_table_iter_next (&iter, &value, NULL)) {
- if (!tracker_db_manager_attach_database (manager->db_manager,
- iface, value, FALSE,
- &internal_error))
- break;
- }
- }
-
- if (internal_error) {
- g_propagate_error (error, internal_error);
- return FALSE;
- }
-
skip_ontology_check:
/* If locale changed, re-create indexes */
if (!read_only && tracker_db_manager_locale_changed (manager->db_manager, NULL)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]