Beispiel #1
0
 def stop(self):
   if self.state != RUNNING:
     raise Exception("Not running")
   self.state = READY
   supervisor.stop_service(self.name)
   supervisor.gen_conf()
   supervisor.reload()
   self.setup_nginx_config()
Beispiel #2
0
 def start(self):
   if self.state != READY:
     raise Exception("Not ready")
   self.state = RUNNING
   supervisor.gen_conf()
   supervisor.reload()
   supervisor.start_service(self.name)
   self.setup_nginx_config()