Return a list of the live processes.

        Returns:
            A list of the live processes.
503397
def live_processes(self):
        
        result = []
        for process_type, process_infos in self.all_processes.items():
            for process_info in process_infos:
                if process_info.process.poll() is None:
                    result.append((process_type, process_info.process))
        return result
1008593
def _run_proxy_processes(proxies):
    '''
    
    '''
    ret = []
    for proxy in proxies:
        result = {}
        if not __salt__['salt_proxy.is_running'](proxy)['result']:
            __salt__['salt_proxy.configure_proxy'](proxy, start=True)
            result[proxy] = 'Proxy {0} was started'.format(proxy)
        else:
            msg = 'Proxy {0} is already running'.format(proxy)
            result[proxy] = msg
            log.debug(msg)
        ret.append(result)
    return ret
87205
def get_queues(self):
        """"""
        res = self.celery.control.inspect().active_queues() or dict()
        return [result.get('name') for host in res.values() for result in host]
712319
def process(self):
        ""
        xp,yp = self.get_processors()
        for ds,n in zip(self.lists, ['train','valid','test']): ds.process(xp, yp, name=n)
        #progress_bar clear the outputs so in some case warnings issued during processing disappear.
        for ds in self.lists:
            if getattr(ds, 'warn', False): warn(ds.warn)
        return self
1069803
def get():
    
    livestatus = mk_livestatus()
    hosts = livestatus.get_hosts()
    services = livestatus.get_services()
    result = {}
    result['hosts'] = hosts
    result['services'] = services
    return result
1267919
def get_events(self):
        '''
        
        '''
        ret = []
        while True:
            event = self.event.get_event(wait=1, full=True)
            if event is None:
                return ret
            ret.append(event)
801270
def ThreadsWithRunningExecServers(self):
    """"""
    socket_dir = '/tmp/pyringe_%s' % self.inferior.pid
    if os.path.isdir(socket_dir):
      return [int(fname[:-9])
              for fname in os.listdir(socket_dir)
              if fname.endswith('.execsock')]
    return []
1134827
def events(self):
        ''''''
        ret = []
        while self.out_queue.qsize():
            ret.append(self.out_queue.get())
        return ret
35120
def list_():
    '''
    
    '''
    mdata = _check_mdata_list()
    if mdata:
        cmd = '{0}'.format(mdata)
        return __salt__['cmd.run'](cmd, ignore_retcode=True).splitlines()
    return {}
684988
def getProcessDatabase(self):
        
        info_dict = {}
        cur = self._conn.cursor()
        cur.execute("""SHOW FULL PROCESSLIST;""")
        rows = cur.fetchall()
        if rows:
            for row in rows:
                db = row[3]
                info_dict[db] = info_dict.get(db, 0) + 1
        return info_dict
1297072
def processes(self, processes):
        '''
        '''

        if self._processes > 1:
            self._pool.close()
            self._pool.join()
            self._pool = multiprocessing.Pool(processes)
        else:
            self._pool = None
        self._logger.log('debug', 'Number of processes set to {}'.format(
            processes
        ))
936910
def list(self):
        """"""
        connection = self._backend._get_connection()
        return list(self._backend.list(connection))
546603
def get_flows_list_by_process_id(self, process_id):
        
        tmp_flows = self.diagram_graph.edges(data=True)
        flows = []
        for flow in tmp_flows:
            if consts.Consts.process in flow[2] and flow[2][consts.Consts.process] == process_id:
                flows.append(flow)
        return flows
408395
public List<ProcessDescription> listProcesses() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        List<ProcessDescription> ret = new ArrayList<ProcessDescription>();
        Class vmClass = lookupVirtualMachineClass();
        Method method = vmClass.getMethod("list");
        List vmDescriptors = (List) method.invoke(null);
        for (Object descriptor : vmDescriptors) {
            Method idMethod = descriptor.getClass().getMethod("id");
            String id = (String) idMethod.invoke(descriptor);
            Method displayMethod = descriptor.getClass().getMethod("displayName");
            String display = (String) displayMethod.invoke(descriptor);
            ret.add(new ProcessDescription(id, display));
        }
        return ret;
    }
828814
def processes(self):
        """"""
        if self._processes is None:
            self._processes = []
            for p in range(self.workers):
                t = Task(self._target, self._args, self._kwargs)
                t.name = "%s-%d" % (self.target_name, p)
                self._processes.append(t)

        return self._processes
1166958
def init_service_processes(self):
        
        processes = []

        for process_struct in getattr(
                self.context.config.settings, 'SERVICE_PROCESSES', ()):
            process_cls = import_object(process_struct[0])
            wait_unless_ready, timeout = process_struct[1], process_struct[2]

            self.logger.info("Init service process '%s'", process_cls.__name__)

            processes.append(
                ProcessWrapper(
                    process_cls, (self.context,),
                    wait_unless_ready=wait_unless_ready,
                    timeout=timeout
                )
            )

        return processes
361002
def getProcessStatus(self):
        
        info_dict = {}
        cur = self._conn.cursor()
        cur.execute("""SHOW FULL PROCESSLIST;""")
        rows = cur.fetchall()
        if rows:
            for row in rows:
                if row[6] == '':
                    state = 'idle'
                elif row[6] is None:
                    state = 'other'
                else:
                    state = str(row[6]).replace(' ', '_').lower()
                info_dict[state] = info_dict.get(state, 0) + 1
        return info_dict