

@spin_first
def queue_status(self, targets='all', verbose=False):
    'Fetch the status of engine queues.\n        \n        Parameters\n        ----------\n        \n        targets : int/str/list of ints/strs\n                the engines whose states are to be queried.\n                default : all\n        verbose : bool\n                Whether to return lengths only, or lists of ids for each element\n        '
    engine_ids = self._build_targets(targets)[1]
    content = dict(targets=engine_ids, verbose=verbose)
    self.session.send(self._query_socket, 'queue_request', content=content)
    (idents, msg) = self.session.recv(self._query_socket, 0)
    if self.debug:
        pprint(msg)
    content = msg['content']
    status = content.pop('status')
    if (status != 'ok'):
        raise self._unwrap_exception(content)
    content = rekey(content)
    if isinstance(targets, int):
        return content[targets]
    else:
        return content

dataset/ETHPy150Open ipython/ipython-py3k/IPython/parallel/client/client.py Client.queue_status/original