[Erp5-report] r42208 nicolas - in /erp5/trunk/utils/cloudooo: ./ cloudooo/
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jan 11 16:11:57 CET 2011
Author: nicolas
Date: Tue Jan 11 16:11:57 2011
New Revision: 42208
URL: http://svn.erp5.org?rev=42208&view=rev
Log:
Rename cloudooo as paster application to avoid conflict with cloudooo as egg namespace
Added:
erp5/trunk/utils/cloudooo/cloudooo/paster_application.py
- copied unchanged from r42207, erp5/trunk/utils/cloudooo/cloudooo/cloudooo.py
Removed:
erp5/trunk/utils/cloudooo/cloudooo/cloudooo.py
Modified:
erp5/trunk/utils/cloudooo/setup.py
Removed: erp5/trunk/utils/cloudooo/cloudooo/cloudooo.py
URL: http://svn.erp5.org/erp5/trunk/utils/cloudooo/cloudooo/cloudooo.py?rev=42207&view=auto
==============================================================================
--- erp5/trunk/utils/cloudooo/cloudooo/cloudooo.py [utf8] (original)
+++ erp5/trunk/utils/cloudooo/cloudooo/cloudooo.py (removed)
@@ -1,116 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2009-2010 Nexedi SA and Contributors. All Rights Reserved.
-# Gabriel M. Monnerat <gabriel at tiolive.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsibility of assessing all potential
-# consequences resulting from its eventual inadequacies and bugs
-# End users who are looking for a ready-to-use solution with commercial
-# guarantees and support are strongly adviced to contract a Free Software
-# Service Company
-#
-# This program is Free Software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-##############################################################################
-
-import gc
-import handler.ooo.monitor as monitor
-from signal import signal, SIGHUP
-from handler.ooo.application.openoffice import openoffice
-from handler.ooo.application.xvfb import xvfb
-from wsgixmlrpcapplication import WSGIXMLRPCApplication
-from utils.utils import convertStringToBool, configureLogger
-from os import path, mkdir
-from handler.ooo.mimemapper import mimemapper
-
-
-def stopProcesses():
- monitor.stop()
- xvfb.stop()
- openoffice.stop()
-
-
-def application(global_config, **local_config):
- """Method to load all configuration of cloudooo and start the application.
- To start the application a number of params are required:
- Keyword arguments:
- debug_mode -- Mode as the application prints the messages.
- e.g debug_mode=logging.DEBUG
- working_path -- Full path to create the environment of the processes.
- e.g working_path='/var/run/cloudooo'
- virtual_display_port -- Port to start the Xvfb.
- virtual_display_id -- Sets the display.
- e.g virtual_display_id='99'
- application_hostname -- Sets the host to Xvfb and Openoffice.
- virtual_screen -- Use to define the screen to Xvfb
- e.g virtual_screen='0'
- office_binary_path -- Full Path of the OOo executable.
- e.g office_binary_path='/opt/openoffice.org3/program'
- uno_path -- Full path to pyuno library.
- e.g uno_path='/opt/openoffice.org/program'
- """
- gc.enable()
- debug_mode = convertStringToBool(local_config.get('debug_mode'))
- configureLogger(debug_mode=debug_mode)
- # path of directory to run cloudooo
- working_path = local_config.get('working_path')
- if not path.exists(working_path):
- mkdir(working_path)
- # directory to create temporary files
- cloudooo_path_tmp_dir = path.join(working_path, 'tmp')
- if not path.exists(cloudooo_path_tmp_dir):
- mkdir(cloudooo_path_tmp_dir)
- # The Xvfb will run in the same local of the OpenOffice
- application_hostname = local_config.get('application_hostname')
- openoffice_port = int(local_config.get('openoffice_port'))
- # Before start Xvfb, first loads the configuration
- xvfb.loadSettings(application_hostname,
- int(local_config.get('virtual_display_port')),
- working_path,
- local_config.get('virtual_display_id'),
- virtual_screen=local_config.get('virtual_screen'),
- start_timeout=local_config.get('start_timeout'))
- xvfb.start()
-
- # Loading Configuration to start OOo Instance and control it
- openoffice.loadSettings(application_hostname,
- openoffice_port,
- working_path,
- local_config.get('virtual_display_id'),
- local_config.get('office_binary_path'),
- local_config.get('uno_path'),
- local_config.get('openoffice_user_interface_language',
- 'en'),
- )
- openoffice.start()
-
- monitor.load(local_config)
- timeout_response = int(local_config.get('timeout_response'))
- kw = dict(uno_path=local_config.get('uno_path'),
- office_binary_path=local_config.get('office_binary_path'),
- timeout=timeout_response)
-
- # Signal to stop all processes
- signal(SIGHUP, lambda x, y: stopProcesses())
-
- # Load all filters
- openoffice.acquire()
- mimemapper.loadFilterList(application_hostname,
- openoffice_port, **kw)
- openoffice.release()
- from manager import Manager
- cloudooo_manager = Manager(cloudooo_path_tmp_dir, **kw)
- return WSGIXMLRPCApplication(instance=cloudooo_manager)
Modified: erp5/trunk/utils/cloudooo/setup.py
URL: http://svn.erp5.org/erp5/trunk/utils/cloudooo/setup.py?rev=42208&r1=42207&r2=42208&view=diff
==============================================================================
--- erp5/trunk/utils/cloudooo/setup.py [utf8] (original)
+++ erp5/trunk/utils/cloudooo/setup.py [utf8] Tue Jan 11 16:11:57 2011
@@ -47,7 +47,7 @@ setup(name='cloudooo',
test_requires=test_require_list,
entry_points="""
[paste.app_factory]
- main = cloudooo.cloudooo:application
+ main = cloudooo.paster_application:application
[console_scripts]
cloudooo_tester = cloudooo.bin.cloudooo_tester:main
echo_cloudooo_conf = cloudooo.bin.echo_cloudooo_conf:main
More information about the Erp5-report
mailing list