made use of threadpool for starting services, refactored services to support 3 validation models (blocking, non-blocking, timer)
This commit is contained in:
parent
37ce407460
commit
c6d2ca6b02
4 changed files with 121 additions and 111 deletions
|
@ -1527,15 +1527,15 @@ class CoreHandler(SocketServer.BaseRequestHandler):
|
|||
|
||||
if event_type == EventTypes.STOP.value or event_type == EventTypes.RESTART.value:
|
||||
status = self.session.services.stopnodeservice(node, service)
|
||||
if status != "0":
|
||||
if status:
|
||||
fail += "Stop %s," % service.name
|
||||
if event_type == EventTypes.START.value or event_type == EventTypes.RESTART.value:
|
||||
status = self.session.services.node_service_startup(node, service, services)
|
||||
if status != "0":
|
||||
if status:
|
||||
fail += "Start %s(%s)," % service.name
|
||||
if event_type == EventTypes.PAUSE.value:
|
||||
status = self.session.services.validatenodeservice(node, service, services)
|
||||
if status != 0:
|
||||
if status:
|
||||
fail += "%s," % service.name
|
||||
if event_type == EventTypes.RECONFIGURE.value:
|
||||
self.session.services.node_service_reconfigure(node, service, services)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue