[Erp5-report] r37679 gabriel - in /erp5/trunk/utils/cloudooo/cloudooo: application/ handler/

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Aug 11 00:20:15 CEST 2010


Author: gabriel
Date: Wed Aug 11 00:20:11 2010
New Revision: 37679

URL: http://svn.erp5.org?rev=37679&view=rev
Log:
fix bug: when memory leak occurs with openoffice.org, sometimes xvfb stop too. So, to fix it was needed check if xvfb is started.

Modified:
    erp5/trunk/utils/cloudooo/cloudooo/application/openoffice.py
    erp5/trunk/utils/cloudooo/cloudooo/handler/oohandler.py

Modified: erp5/trunk/utils/cloudooo/cloudooo/application/openoffice.py
URL: http://svn.erp5.org/erp5/trunk/utils/cloudooo/cloudooo/application/openoffice.py?rev=37679&r1=37678&r2=37679&view=diff
==============================================================================
--- erp5/trunk/utils/cloudooo/cloudooo/application/openoffice.py [utf8] (original)
+++ erp5/trunk/utils/cloudooo/cloudooo/application/openoffice.py [utf8] Wed Aug 11 00:20:11 2010
@@ -33,6 +33,7 @@ from threading import Lock
 from cloudooo.ooolib import setUpUnoEnvironment
 from zope.interface import implements
 from application import Application
+from xvfb import xvfb
 from cloudooo.interfaces.lockable import ILockable
 from cloudooo.utils import logger, waitStartDaemon,\
     removeDirectory, waitStopDaemon, convertStringToBool
@@ -108,6 +109,8 @@ class OpenOffice(Application):
 
   def start(self):
     """Start Instance."""
+    if not xvfb.status():
+      xvfb.restart()
     self.path_user_installation = join(self.path_run_dir, \
         "cloudooo_instance_%s" % self.port)
     if exists(self.path_user_installation):

Modified: erp5/trunk/utils/cloudooo/cloudooo/handler/oohandler.py
URL: http://svn.erp5.org/erp5/trunk/utils/cloudooo/cloudooo/handler/oohandler.py?rev=37679&r1=37678&r2=37679&view=diff
==============================================================================
--- erp5/trunk/utils/cloudooo/cloudooo/handler/oohandler.py [utf8] (original)
+++ erp5/trunk/utils/cloudooo/cloudooo/handler/oohandler.py [utf8] Wed Aug 11 00:20:11 2010
@@ -30,6 +30,7 @@ import jsonpickle
 from os import environ
 from subprocess import Popen, PIPE
 from cloudooo.application.openoffice import openoffice
+from cloudooo.application.xvfb import xvfb
 from zope.interface import implements
 from cloudooo.interfaces.handler import IHandler
 from cloudooo.mimemapper import mimemapper
@@ -111,6 +112,7 @@ class OOHandler:
   def _callUnoConverter(self, *feature_list, **kw):
     """ """
     if not openoffice.status():
+      xvfb.restart()
       openoffice.start()
     command = self._getCommand(*feature_list, **kw)
     stdout, stderr = self._subprocess(command)




More information about the Erp5-report mailing list