summaryrefslogtreecommitdiff
path: root/win32/OpenERPServerService.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@openerp.com>2012-12-05 18:57:50 +0100
committerChristophe Simonis <chs@openerp.com>2012-12-05 18:57:50 +0100
commit9065642cc9699a39e69f5e97c5b66fb0911ffd34 (patch)
treeaff91ef4e4a518e9e4fd87d7f6c22a49f06e7f68 /win32/OpenERPServerService.py
parenteffec78db7524006bc387556aacf460e7424637b (diff)
[FIX] win32 service: remove commented code
bzr revid: chs@openerp.com-20121205175750-hqo058i7bp1g68rp
Diffstat (limited to 'win32/OpenERPServerService.py')
-rw-r--r--win32/OpenERPServerService.py25
1 files changed, 1 insertions, 24 deletions
diff --git a/win32/OpenERPServerService.py b/win32/OpenERPServerService.py
index f2a6007d118..8b3c117c03d 100644
--- a/win32/OpenERPServerService.py
+++ b/win32/OpenERPServerService.py
@@ -73,30 +73,7 @@ class OpenERPServerService(win32serviceutil.ServiceFramework):
def option_handler(opts):
# configure the service to auto restart on failures...
- service_name = OpenERPServerService._svc_name
-
- subprocess.call(['sc', 'failure', service_name, 'reset=', '0', 'actions=', 'restart/0/restart/0/restart/0'])
-
- # hscm = win32service.OpenSCManager(None, None, win32service.SC_MANAGER_ALL_ACCESS)
- # try:
- # hs = win32serviceutil.SmartOpenService(hscm, service_name, win32service.SERVICE_ALL_ACCESS)
- # try:
- # service_failure_actions = {
- # 'ResetPeriod': 0, # Time in ms after which to reset the failure count to zero.
- # 'RebootMsg': u'', # Not using reboot option
- # 'Command': u'', # Not using run-command option
- # 'Actions': [
- # (win32service.SC_ACTION_RESTART, 10), # action, delay in ms
- # (win32service.SC_ACTION_RESTART, 10),
- # (win32service.SC_ACTION_RESTART, 10),
- # ]
- # }
- # win32service.ChangeServiceConfig2(hs, win32service.SERVICE_CONFIG_FAILURE_ACTIONS, service_failure_actions)
- # finally:
- # win32service.CloseServiceHandle(hs)
- # finally:
- # win32service.CloseServiceHandle(hscm)
-
+ subprocess.call(['sc', 'failure', meta.nt_service_name, 'reset=', '0', 'actions=', 'restart/0/restart/0/restart/0'])
if __name__ == '__main__':
# Do with the service whatever option is passed in the command line