def METHOD_NAME(queue):
    queues = [q.name for q in current_app.config['CELERY_TASK_QUEUES']]
    if queue:
        queues = [q for q in queues if q == queue]
    if not len(queues):
        exit_with_error('Error: no queue found')
    return queues