List contents of a queue
778310
def list_items(queue):
    '''
    
    '''
    itemstuple = _list_items(queue)
    items = [item[0] for item in itemstuple]
    return items
415928
def print_preprocessing_list(preprocessing_queue):
    
    print("## Preprocessing")
    print("```")
    for algorithm in preprocessing_queue:
        print("* " + str(algorithm))
    print("```")
212350
def get_jobs_from_queue(self, queue: str, max_jobs: int) -> List[Job]:
        """"""
        jobs_json_string = self._run_script(
            self._get_jobs_from_queue,
            self._to_namespaced(queue),
            self._to_namespaced(RUNNING_JOBS_KEY.format(self._id)),
            JobStatus.RUNNING.value,
            max_jobs
        )

        jobs = json.loads(jobs_json_string.decode())
        jobs = [Job.deserialize(job) for job in jobs]

        return jobs
939924
def packages(self):
        
        queue_list = []
        for read in self.queued.splitlines():
            read = read.lstrip()
            if not read.startswith("#"):
                queue_list.append(read.replace("\n", ""))
        return queue_list
1207366
def list_job_ids(self, skip=0, limit=20):
        

        return [str(x["_id"]) for x in self.collection.find(
            {"status": "queued"},
            sort=[("_id", -1 if self.is_reverse else 1)],
            projection={"_id": 1})
        ]
158785
def queue_raw_jobs(queue, params_list, **kwargs):
    

    from .queue import Queue
    queue_obj = Queue(queue)
    queue_obj.enqueue_raw_jobs(params_list, **kwargs)
18060
public void listContents() throws IOException {
        for (;;) {
            TarEntry entry = this.tarIn.getNextEntry();

            if (entry == null) {
                if (this.debug) {
                    System.err.println("READ EOF RECORD");
                }
                break;
            }

            if (this.progressDisplay != null) {
                this.progressDisplay.showTarProgressMessage(entry.getName());
            }
        }
    }
1146073
def get_all_queues(self, prefix=''):
        
        params = {}
        if prefix:
            params['QueueNamePrefix'] = prefix
        return self.get_list('ListQueues', params, [('QueueUrl', Queue)])
1265710
def queues(self, page=None, per_page=None, previous=None, prefix=None):
        
        options = {}
        if page is not None:
            raise Exception('page param is deprecated!')
        if per_page is not None:
            options['per_page'] = per_page
        if previous is not None:
            options['previous'] = previous
        if prefix is not None:
            options['prefix'] = prefix

        query = urlencode(options)
        url = 'queues'
        if query != '':
            url = "%s?%s" % (url, query)
        result = self.client.get(url)

        return [queue['name'] for queue in result['body']['queues']]
525793
def info(self):
        
        pending = 0
        for q in self.queues():
             pending += self.size(q)
        return {
            'pending'   : pending,
            'processed' : Stat('processed',self).get(),
            'queues'    : len(self.queues()),
            'workers'   : len(self.workers()),
            #'working'   : len(self.working()),
            'failed'    : Stat('failed',self).get(),
            'servers'   : ['%s:%s' % (self.host, self.port)]
        }
575994
def queue(self):
        """"""
        with self.connection_pool.acquire(block=True) as conn:
            return Q(
                self.routing_key,
                exchange=self.exchange,
                routing_key=self.routing_key
            )(conn)
632527
def items(self):
        """"""
        result = [(key, self._mapping[key]) for key in list(self._queue)]
        result.reverse()
        return result
221477
def queues():
    """"""
    conn = worker.connection
    failure_q = None

    def _repr(q):
        return "running:%d pending:%d finished:%d" % (
            StartedJobRegistry(q.name, conn).count,
            q.count,
            FinishedJobRegistry(q.name, conn).count)
    for q in Queue.all(conn):
        if q.name == 'failed':
            failure_q = q
            continue
        click.echo("%s %s" % (q.name, _repr(q)))
    if failure_q:
        click.echo(
            click.style(failure_q.name, fg='red') + ' %s' % _repr(failure_q))
627141
def get(self, queue_get):
        
        if isinstance(queue_get, (tuple, list)):
            self.result.extend(queue_get)
299600
def email_queue():
    """"""
    status = SERVER_STATUS['OK']
    count = Message.objects.exclude(priority=PRIORITY_DEFERRED).filter(
        when_added__lte=now() - timedelta(minutes=QUEUE_TIMEOUT)).count()

    if QUEUE_WARNING_THRESHOLD <= count < QUEUE_DANGER_THRESHOLD:
        status = SERVER_STATUS['WARNING']
    if count >= QUEUE_DANGER_THRESHOLD:
        status = SERVER_STATUS['DANGER']

    return {
        'label': 'Queued Email',
        'status': status,
        'info': 'There are currently {0} messages in the mail queue.'.format(
            count)
    }
248268
@Override
    public List<com.enioka.jqm.api.Queue> getQueues()
    {
        try
        {
            return target.path("q").request().get(new GenericType<List<Queue>>()
            {
            });
        }
        catch (Exception e)
        {
            throw new JqmClientException(e);
        }
    }
772695
def list(self, limit=None, marker=None, end_marker=None, prefix=None):
        
        return self._manager.list(limit=limit, marker=marker,
                end_marker=end_marker, prefix=prefix)