@classmethod
def get_all_by_priority(cls, names):
    """
        Return all the queues with the given names, sorted by priorities (higher
        priority first), then by name
        """
    names = cls._get_iterable_for_names(names)
    queues = cls.get_all(names)
    queues.sort(key=lambda q: int(q.priority.hget() or 0), reverse=True)
    return queues
