def qpeeknext(qname, peek_type):
    qconn  = _get_qconnection(QHOST, QPORT)
    print "Peeking at next %s job in queue" % peek_type, qconn.use(qname)
    job = getattr(qconn, 'peek_%s' % peek_type)()
    if not job:
        print 'No %s jobs in %s' % (peek_type, qname)
        return
    print job.jid, job.body
peeks at the next job in a tube
dataset/ETHPy150Open chexov/queueit/beanstalkd/queueit/__init__.py/qpeeknext