@staticmethod
def queue_compare(node1, node2):
    """
        Compares two nodes for sorting queued nodes.

        :param enarksh.controller.node.Node node1:
        :param enarksh.controller.node.Node node2:

        :rtype: int
        """
    cmp = node2.scheduling_weight - node1.scheduling_weight
    if cmp == 0:
        if node1.name.lower() < node2.name.lower():
            cmp = -1
        elif node1.name.lower() > node2.name.lower():
            cmp = 1
        else:
            cmp = 0
    return cmp
