#NEWLINE# def get_queue_by_index( index ) : #NEWLINE# #INDENT# '\n    Returns an rq Queue using parameters defined in ``QUEUES_LIST``\n    ' #NEWLINE# from . settings import QUEUES_LIST #NEWLINE# config = QUEUES_LIST [ int ( index ) ] #NEWLINE# if ( config [ 'name' ] == 'failed' ) : #NEWLINE# #INDENT# return FailedQueue ( connection = get_redis_connection ( config [ 'connection_config' ] ) ) #NEWLINE# #UNINDENT# return DjangoRQ ( config [ 'name' ] , connection = get_redis_connection ( config [ 'connection_config' ] ) , async = config . get ( 'ASYNC' , True ) )