[tracker/tracker-store] Fixed push modules, bugfix closing the query
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker/tracker-store] Fixed push modules, bugfix closing the query
- Date: Sun, 14 Jun 2009 17:53:20 -0400 (EDT)
commit 200458bd0db45b04470fb8d785f31e7fd726434c
Author: Philip Van Hoof <philip codeminded be>
Date: Sun Jun 14 23:53:13 2009 +0200
Fixed push modules, bugfix closing the query
.../evolution/tracker-evolution-registrar.c | 22 ++++++++----------
src/plugins/kmail/tracker-kmail-registrar.c | 23 ++++++++-----------
2 files changed, 20 insertions(+), 25 deletions(-)
---
diff --git a/src/plugins/evolution/tracker-evolution-registrar.c b/src/plugins/evolution/tracker-evolution-registrar.c
index 9366b5f..c92dfc0 100644
--- a/src/plugins/evolution/tracker-evolution-registrar.c
+++ b/src/plugins/evolution/tracker-evolution-registrar.c
@@ -55,8 +55,6 @@
#define DATASOURCE_URN "urn:nepomuk:datasource:1cb1eb90-1241-11de-8c30-0800200c9a66"
-#define RELAXED_IMPORT_SECONDS 5
-
typedef struct TrackerEvolutionPushRegistrar TrackerEvolutionPushRegistrar;
typedef struct TrackerEvolutionPushRegistrarClass TrackerEvolutionPushRegistrarClass;
@@ -578,6 +576,8 @@ perform_set (TrackerEvolutionRegistrar *object,
i++;
}
+ tracker_sparql_builder_insert_close (sparql);
+
tracker_store_queue_sparql_update (tracker_sparql_builder_get_result (sparql),
NULL, NULL, NULL);
@@ -749,11 +749,10 @@ tracker_evolution_registrar_set_many (TrackerEvolutionRegistrar *object,
info->predicates = strv_ptrarray_dup (predicates);
info->values = strv_ptrarray_dup (values);
- g_timeout_add_seconds_full (G_PRIORITY_LOW,
- RELAXED_IMPORT_SECONDS,
- set_many_idle,
- info,
- set_many_destroy);
+ g_idle_add_full (G_PRIORITY_LOW,
+ set_many_idle,
+ info,
+ set_many_destroy);
}
@@ -819,11 +818,10 @@ tracker_evolution_registrar_unset_many (TrackerEvolutionRegistrar *object,
info->modseq = modseq;
info->subjects = g_strdupv (subjects);
- g_timeout_add_seconds_full (G_PRIORITY_LOW,
- RELAXED_IMPORT_SECONDS,
- unset_many_idle,
- info,
- unset_many_destroy);
+ g_idle_add_full (G_PRIORITY_LOW,
+ unset_many_idle,
+ info,
+ unset_many_destroy);
}
void
diff --git a/src/plugins/kmail/tracker-kmail-registrar.c b/src/plugins/kmail/tracker-kmail-registrar.c
index 597afde..38cda7e 100644
--- a/src/plugins/kmail/tracker-kmail-registrar.c
+++ b/src/plugins/kmail/tracker-kmail-registrar.c
@@ -53,8 +53,6 @@
#define DATASOURCE_URN "urn:nepomuk:datasource:4a157cf0-1241-11de-8c30-0800200c9a66"
-#define RELAXED_IMPORT_SECONDS 5
-
typedef struct TrackerKMailPushRegistrar TrackerKMailPushRegistrar;
typedef struct TrackerKMailPushRegistrarClass TrackerKMailPushRegistrarClass;
@@ -341,6 +339,8 @@ perform_set (TrackerKMailRegistrar *object,
i++;
}
+ tracker_sparql_builder_insert_close (sparql);
+
tracker_store_queue_sparql_update (tracker_sparql_builder_get_result (sparql),
NULL, NULL, NULL);
@@ -511,11 +511,10 @@ tracker_kmail_registrar_set_many (TrackerKMailRegistrar *object,
info->predicates = strv_ptrarray_dup (predicates);
info->values = strv_ptrarray_dup (values);
- g_timeout_add_seconds_full (G_PRIORITY_LOW,
- RELAXED_IMPORT_SECONDS,
- set_many_idle,
- info,
- set_many_destroy);
+ g_idle_add_full (G_PRIORITY_LOW,
+ set_many_idle,
+ info,
+ set_many_destroy);
}
@@ -581,12 +580,10 @@ tracker_kmail_registrar_unset_many (TrackerKMailRegistrar *object,
info->modseq = modseq;
info->subjects = g_strdupv (subjects);
- g_timeout_add_seconds_full (G_PRIORITY_LOW,
- RELAXED_IMPORT_SECONDS,
- unset_many_idle,
- info,
- unset_many_destroy);
-
+ g_idle_add_full (G_PRIORITY_LOW,
+ unset_many_idle,
+ info,
+ unset_many_destroy);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]