(rconn,ip,status,flag=0)
update status
update status
update status
def updateIPPOOLS(rconn,ip,status,flag=0): # 0代表对status减一，-1代表减2，1代表加1
    if int(status) < 1:
        removeIPPOOLS(rconn,ip,status)
        return
    '''update status'''
    if flag == 1: #+status
        if int(status) < 10:
            rconn.delete('IP:'+ ip + ':' + status)
            status = int(status) + 1
            rconn.set("IP:%s:%s"%(ip,str(status)),ip)
    elif flag == -1:
        rconn.delete('IP:'+ ip + ':' + status)
        status = int(status) - 2
        rconn.set("IP:%s:%s"%(ip,str(status)),ip)
    else:
        rconn.delete('IP:'+ ip + ':' + status)
        status = int(status) - 1
        rconn.set("IP:%s:%s"%(ip,str(status)),ip)
def updateIPPOOLS ( rconn , ip , status , flag = 0 ) : # 0代表对status减一，-1代表减2，1代表加1 if int ( status ) < 1 : removeIPPOOLS ( rconn , ip , status ) return if flag == 1 : #+status if int ( status ) < 10 : rconn . delete ( 'IP:' + ip + ':' + status ) status = int ( status ) + 1 rconn . set ( "IP:%s:%s" % ( ip , str ( status ) ) , ip ) elif flag == - 1 : rconn . delete ( 'IP:' + ip + ':' + status ) status = int ( status ) - 2 rconn . set ( "IP:%s:%s" % ( ip , str ( status ) ) , ip ) else : rconn . delete ( 'IP:' + ip + ':' + status ) status = int ( status ) - 1 rconn . set ( "IP:%s:%s" % ( ip , str ( status ) ) , ip )