parameters: (self)
docstring: Stops a database engine.
          :return: None
docstring_summary: Stops a database engine.
          :return: None
docstring_tokens: Stops a database engine . : return : None
function: def stop(self):
          """
          Stops a database engine.
          :return: None
          """
          if self.pid is None:
              logging.debug("database engine already stopped")
              return
  
          logging.debug("disconnecting from database engine management command port")
          self.poller.unregister(self.socket)
          self.socket.close()
          self.socket = None
  
          logging.info("Stopping database engine pid=%s", self.pid)
          os.kill(self.pid, signal.SIGTERM)
          os.waitpid(self.pid, 0)
  
          # Now search for any remaining database processes in order to ensure that we have closed everything down.
          for p in psutil.process_iter():
              if "infinisqld" in p.name:
                  logging.info("Terminating '%s' pid=%s", p.name, p.pid)
                  p.terminate()
          logging.info("Stopped database engine.")
          self.pid = None
function_tokens: def stop ( self ) : if self . pid is None : logging . debug ( "database engine already stopped" ) return logging . debug ( "disconnecting from database engine management command port" ) self . poller . unregister ( self . socket ) self . socket . close ( ) self . socket = None logging . info ( "Stopping database engine pid=%s" , self . pid ) os . kill ( self . pid , signal . SIGTERM ) os . waitpid ( self . pid , 0 ) # Now search for any remaining database processes in order to ensure that we have closed everything down. for p in psutil . process_iter ( ) : if "infinisqld" in p . name : logging . info ( "Terminating '%s' pid=%s" , p . name , p . pid ) p . terminate ( ) logging . info ( "Stopped database engine." ) self . pid = None