|
|
@@ -34,10 +34,6 @@ class SupervisordUtils:
|
|
|
except Exception as e:
|
|
|
pass
|
|
|
|
|
|
- self.supervisor.removeProcessGroup(name)
|
|
|
- self.supervisor.reloadConfig()
|
|
|
- self.supervisor.addProcessGroup(name)
|
|
|
-
|
|
|
def restart(self, name):
|
|
|
self.stop(name)
|
|
|
self.supervisor.removeProcessGroup(name)
|
|
|
@@ -45,14 +41,7 @@ class SupervisordUtils:
|
|
|
self.supervisor.addProcessGroup(name)
|
|
|
|
|
|
def remove(self, name):
|
|
|
- try:
|
|
|
- info = self.supervisor.getProcessInfo(name)
|
|
|
- statename = info['statename']
|
|
|
- if statename == 'RUNNING':
|
|
|
- self.supervisor.stopProcess(name)
|
|
|
- except Exception as e:
|
|
|
- pass
|
|
|
-
|
|
|
+ self.stop(name)
|
|
|
self.supervisor.removeProcessGroup(name)
|
|
|
path = '/data/supervisor/config.d'
|
|
|
file_path = os.path.join(path, name)
|