[REF] netrpc: removed.
[odoo/odoo.git] / openerp / service / __init__.py
index 307ee4a..9f92134 100644 (file)
@@ -29,7 +29,6 @@ import threading
 import time
 
 import cron
-import netrpc_server
 import web_services
 import web_services
 import wsgi_server
@@ -75,8 +74,6 @@ def start_internal():
     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()
 
@@ -84,10 +81,8 @@ def start_internal():
     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.
@@ -97,7 +92,6 @@ def stop_services():
     """ Stop all services. """
     # stop services
     cron.stop_service()
-    netrpc_server.stop_service()
     wsgi_server.stop_service()
 
     _logger.info("Initiating shutdown")
@@ -130,7 +124,7 @@ def start_services_workers():
 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[:]