'Get the list of processes in which WSGI server is running.'

def _get_workers(self):

    def safe_ppid(proc):
        try:
            return proc.ppid()
        except psutil.NoSuchProcess:
            return None
    if (self.workers > 1):
        return [proc.pid for proc in psutil.process_iter() if (safe_ppid(proc) == self.service_pid)]
    else:
        return [proc.pid for proc in psutil.process_iter() if (proc.pid == self.service_pid)]
