Skip to content

Commit

Permalink
Solve issue #14
Browse files Browse the repository at this point in the history
  • Loading branch information
YoannQueret committed Sep 21, 2022
1 parent af1d2bd commit 1adf9b6
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1438,25 +1438,27 @@ def serviceAction(self, action, service, uniq_id):
server = xmlrpc_client.ServerProxy(self.conf.config['global']['supervisor_xmlrpc'])
try:
if action == 'start':
server.supervisor.reloadConfig()
server.supervisor.removeProcessGroup(process)
server.supervisor.reloadConfig()
server.supervisor.addProcessGroup(process)
server.supervisor.reloadConfig()
#server.supervisor.startProcess(process)
# NOTE : To solve issue #14, and pay attention to side effects
#server.supervisor.reloadConfig()
#server.supervisor.removeProcessGroup(process)
#server.supervisor.reloadConfig()
#server.supervisor.addProcessGroup(process)
#server.supervisor.reloadConfig()
server.supervisor.startProcess(process)
if uniq_id != '':
self.conf.setConfigurationChanged(uniq_id, service, False)
elif action == 'stop':
server.supervisor.stopProcess(process)
elif action == 'restart':
server.supervisor.stopProcess(process)

server.supervisor.reloadConfig()
server.supervisor.removeProcessGroup(process)
server.supervisor.reloadConfig()
server.supervisor.addProcessGroup(process)
server.supervisor.reloadConfig()
#server.supervisor.startProcess(process)
# NOTE : To solve issue #14, and pay attention to side effects
#server.supervisor.reloadConfig()
#server.supervisor.removeProcessGroup(process)
#server.supervisor.reloadConfig()
#server.supervisor.addProcessGroup(process)
#server.supervisor.reloadConfig()
server.supervisor.startProcess(process)
if uniq_id != '':
self.conf.setConfigurationChanged(uniq_id, service, False)
except Exception as e:
Expand Down

0 comments on commit 1adf9b6

Please sign in to comment.