def get_failed_queue_index(name='default'):
"""
Returns the position of FailedQueue for the named queue in QUEUES_LIST
"""
# Get the index of FailedQueue for 'default' Queue in QUEUES_LIST
queue_index = None
connection = get_connection(name)
connection_kwargs = connection.connection_pool.connection_kwargs
for i in range(0, 100):
q = get_queue_by_index(i)
if q.name == 'failed' and q.connection.connection_pool.connection_kwargs == connection_kwargs:
queue_index = i
break
return queue_index
评论列表
文章目录