def p_nc_heart_beat_isAlive(): logger.debug('p_nc_heart_beat_isAlive()') global g_nc_heart_beat heartT = time.time() for ip in g_nc_heart_beat: if (heartT - g_nc_heart_beat[ip]) < 4: logger.debug('NC %s is alive' % ip) else: logger.debug('NC %s is dead!!!' % ip) if g_clc_ip!=None: OpenLdap.luhya_nc_dead(g_clc_ip,ip,thd_SERVICE_TYPE.CLOUD_NC) heart = threading.Timer(4.0,p_nc_heart_beat_isAlive) heart.start()