def jobs():
    queue = request.args(0) or "failed"
    rq = RqConn()
    return response.json({'jobs':rq.list_jobs(queue)})
def requeue_failed():
    rq = RqConn()
    failed_jobs = rq.list_jobs('failed')
    for job in failed_jobs:
        rq.requeue_job(job['id'])
    return 0