[tracker/tracker-0.8] tracker-miner-fs: Use 60s as default DBus timeout for requests to extractor
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.8] tracker-miner-fs: Use 60s as default DBus timeout for requests to extractor
- Date: Fri, 16 Jul 2010 10:14:28 +0000 (UTC)
commit dbb1de60773a2ed8be6292393741f9f69c2a5e6c
Author: Aleksander Morgado <aleksander lanedo com>
Date: Thu Jul 8 18:44:00 2010 +0200
tracker-miner-fs: Use 60s as default DBus timeout for requests to extractor
src/miners/fs/tracker-miner-files.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 085c99b..dcdacff 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -45,6 +45,9 @@
#define DISK_SPACE_CHECK_FREQUENCY 10
+/* Default DBus timeout to be used in requests to extractor (milliseconds) */
+#define EXTRACTOR_DBUS_TIMEOUT 60000
+
#define TRACKER_MINER_FILES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_MINER_FILES, TrackerMinerFilesPrivate))
static GQuark miner_files_error_quark = 0;
@@ -1551,6 +1554,16 @@ extractor_create_proxy (void)
if (!proxy) {
g_critical ("Could not create a DBusGProxy to the extract service");
+ } else {
+ /* Set default timeout for DBus requests to be around 60s.
+ * Assuming that the files which need more time to get extracted are PDFs
+ * using libpoppler, we already have a limit in the PDF extractor not to
+ * spend more than 5s extraction contents. And, assuming the default
+ * value of 10 in process-pool-limit, it means we may end up queueing up
+ * to 10 PDF files which may need 5s each, so in order not to have dbus
+ * timeouts in this case, any value greater than 5*10 would be good.
+ */
+ dbus_g_proxy_set_default_timeout (proxy, EXTRACTOR_DBUS_TIMEOUT);
}
return proxy;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]