Commit 27fc13bd authored by 段英荣's avatar 段英荣

modify

parent 43d2213a
...@@ -231,7 +231,7 @@ class ESPerform(object): ...@@ -231,7 +231,7 @@ class ESPerform(object):
logging.error("catch exception,item:%s,err_msg:%s" % (str(item),traceback.format_exc())) logging.error("catch exception,item:%s,err_msg:%s" % (str(item),traceback.format_exc()))
return True return True
if high_num > len(es_nodes_list)/5: if high_num > 3:
logging.info("check es_nodes_load high,cpu load:%s" % str(es_nodes_info_list)) logging.info("check es_nodes_load high,cpu load:%s" % str(es_nodes_info_list))
return True return True
else: else:
......
...@@ -169,11 +169,12 @@ def home_recommend(device_id="", user_id=-1, offset=0, size=10, query_type=Topic ...@@ -169,11 +169,12 @@ def home_recommend(device_id="", user_id=-1, offset=0, size=10, query_type=Topic
recommend_topic_ids = list() recommend_topic_ids = list()
try: es_node_load_high_flag = False
es_node_load_high_flag = ESPerform.if_es_node_load_high(ESPerform.get_cli()) # try:
except: # es_node_load_high_flag = ESPerform.if_es_node_load_high(ESPerform.get_cli())
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) # except:
es_node_load_high_flag = True # logging.error("catch exception,err_msg:%s" % traceback.format_exc())
# es_node_load_high_flag = True
if es_node_load_high_flag: if es_node_load_high_flag:
temp_downgrading_key = "physical:home_recommend:user_id:241407656:query_type:1" temp_downgrading_key = "physical:home_recommend:user_id:241407656:query_type:1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment