(self, name)
return master_procs
Return a psutil process for the master gunicorn process with the given name.
Return a psutil process for the master gunicorn process with the given name.
Return a psutil process for the master gunicorn process with the given name .
def _get_master_proc_by_name(self, name):
        """Return a psutil process for the master gunicorn process with the given name."""
        master_name = GUnicornCheck._get_master_proc_name(name)
        master_procs = []
        for p in psutil.process_iter():
            try:
                if p.cmdline()[0] == master_name:
                    master_procs.append(p)
            except (IndexError, psutil.Error) as e:
                self.log.debug("Cannot read information from process %s: %s", p.name(), e, exc_info=True)
        self.log.debug("There are %s master process(es) with the name %s", len(master_procs), name)
        return master_procs
def _get_master_proc_by_name ( self , name ) : master_name = GUnicornCheck . _get_master_proc_name ( name ) master_procs = [ ] for p in psutil . process_iter ( ) : try : if p . cmdline ( ) [ 0 ] == master_name : master_procs . append ( p ) except ( IndexError , psutil . Error ) as e : self . log . debug ( "Cannot read information from process %s: %s" , p . name ( ) , e , exc_info = True ) self . log . debug ( "There are %s master process(es) with the name %s" , len ( master_procs ) , name ) return master_procs