Ejemplo n.º 1
0
def failover_check(poll_cycle):
    if poll_cycle is None:
        pollno = 1
    else:
        pollno = poll_cycle

    print "failover check no. %d" % pollno

    pollresult = hrdf.failover_check(pollno)

    return pollresult
Ejemplo n.º 2
0
def failover_check(poll_cycle):
    if poll_cycle is None:
        pollno = 1
    else:
        pollno = poll_cycle

    #print "failover check no. %d" % pollno

    # need to wrap this in try fail so that the failover
    # check doesn't go away if we hit a python bug
    try:
        pollresult = hrdf.failover_check(pollno)
    except Exception as e:
        pollresult = { "result" : "FAIL",
            "details" : "Failover check encountered error: %s" % repr(e) }

    return pollresult
Ejemplo n.º 3
0
def failover_check(poll_cycle):
    if poll_cycle is None:
        pollno = 1
    else:
        pollno = poll_cycle

    #print "failover check no. %d" % pollno

    # need to wrap this in try fail so that the failover
    # check doesn't go away if we hit a python bug
    try:
        pollresult = hrdf.failover_check(pollno)
    except Exception as e:
        pollresult = {
            "result": "FAIL",
            "details": "Failover check encountered error: %s" % repr(e)
        }

    return pollresult