online-desktop r7251 - trunk/pyddm/ddm



Author: otaylor
Date: Wed May  7 21:43:36 2008
New Revision: 7251
URL: http://svn.gnome.org/viewvc/online-desktop?rev=7251&view=rev

Log:
Set a long timeout (10 minutes) when making calls against the data
model engine. This matches what the C client library does.
(http://bugzilla.gnome.org/show_bug.cgi?id=532044)


Modified:
   trunk/pyddm/ddm/DataModel.py

Modified: trunk/pyddm/ddm/DataModel.py
==============================================================================
--- trunk/pyddm/ddm/DataModel.py	(original)
+++ trunk/pyddm/ddm/DataModel.py	Wed May  7 21:43:36 2008
@@ -9,6 +9,10 @@
 from ddm.NotificationSet import *
 from ddm.Resource import *
 
+# Timeout we set when making method calls against D-BUS. Default would be
+# 25 seconds but things can get slow when we have to go to the server
+_DBUS_TIMEOUT=600 # 10 minutes
+
 # For idle handling
 import gobject
 
@@ -271,7 +275,7 @@
         #_logger.debug("executing query method: '%s' fetch: '%s' params: '%s'", method_uri, self.__fetch, self._params)
         if self.__is_update:
             self.__model._get_proxy().Update(self.__model.callback.path, method_uri, self.__fetch, self._params,
-                                             dbus_interface='org.freedesktop.od.Model', reply_handler=self.__on_query_reply, error_handler=self.__on_query_error)
+                                             dbus_interface='org.freedesktop.od.Model', reply_handler=self.__on_query_reply, error_handler=self.__on_query_error, timeout=_DBUS_TIMEOUT)
         else:
             self.__model._get_proxy().Query(self.__model.callback.path, method_uri, self.__fetch, self._params,
-                                            dbus_interface='org.freedesktop.od.Model', reply_handler=self.__on_query_reply, error_handler=self.__on_query_error)
+                                            dbus_interface='org.freedesktop.od.Model', reply_handler=self.__on_query_reply, error_handler=self.__on_query_error, timeout=_DBUS_TIMEOUT)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]