import time
import cron
-import netrpc_server
import web_services
import web_services
import wsgi_server
openerp.netsvc.init_logger()
openerp.modules.loading.open_openerp_namespace()
- # Instantiate local services (this is a legacy design).
- openerp.osv.osv.start_object_proxy()
# Export (for RPC) services.
web_services.start_service()
start_internal_done = True
def start_services():
- """ Start all services including http, netrpc and cron """
+ """ Start all services including http, and cron """
start_internal()
- # Initialize the NETRPC server.
- netrpc_server.start_service()
# Start the WSGI server.
wsgi_server.start_service()
# Start the main cron thread.
""" Stop all services. """
# stop services
cron.stop_service()
- netrpc_server.stop_service()
wsgi_server.stop_service()
_logger.info("Initiating shutdown")
def _reexec():
"""reexecute openerp-server process with (nearly) the same arguments"""
if openerp.tools.osutil.is_running_as_nt_service():
- subprocess.call('sc stop {0} && sc start {0}'.format(nt_service_name), shell=True)
+ subprocess.call('net stop {0} && net start {0}'.format(nt_service_name), shell=True)
exe = os.path.basename(sys.executable)
strip_args = ['-d', '-u']
a = sys.argv[:]