Commit 8442ef9e authored by lixiaofang's avatar lixiaofang

add

parents 894987b3 a61703a2
...@@ -244,7 +244,11 @@ def get_type_info_map(): ...@@ -244,7 +244,11 @@ def get_type_info_map():
name='associate_tag', name='associate_tag',
type='associate_tag', type='associate_tag',
model=agile_tag.AgileTagType, model=agile_tag.AgileTagType,
query_deferred=lambda: agile_tag.AgileTag.objects.all().query, query_deferred=lambda: agile_tag.AgileTag.objects.filter(AGILE_TAG_TYPE.DOCTOR, AGILE_TAG_TYPE.HOSPITAL,
AGILE_TAG_TYPE.BRAND, AGILE_TAG_TYPE.INSTRUMENT,
AGILE_TAG_TYPE.PROJECT,
AGILE_TAG_TYPE.POSITION,
AGILE_TAG_TYPE.UNDEFINED).query,
get_data_func=TagTransfer.get_tag_suggest_data_list, get_data_func=TagTransfer.get_tag_suggest_data_list,
bulk_insert_chunk_size=100, bulk_insert_chunk_size=100,
round_insert_chunk_size=5, round_insert_chunk_size=5,
...@@ -254,7 +258,8 @@ def get_type_info_map(): ...@@ -254,7 +258,8 @@ def get_type_info_map():
name='associate_tag_brand', name='associate_tag_brand',
type='associate_tag_brand', type='associate_tag_brand',
model=agile_tag.AgileTagType, model=agile_tag.AgileTagType,
query_deferred=lambda: agile_tag.AgileTag.objects.filter().query, query_deferred=lambda: agile_tag.AgileTag.objects.filter(AGILE_TAG_TYPE.BRAND,
AGILE_TAG_TYPE.UNDEFINED).query,
get_data_func=TagTransfer.get_tag_suggest_brand_data_list, get_data_func=TagTransfer.get_tag_suggest_brand_data_list,
bulk_insert_chunk_size=100, bulk_insert_chunk_size=100,
round_insert_chunk_size=5, round_insert_chunk_size=5,
...@@ -264,7 +269,8 @@ def get_type_info_map(): ...@@ -264,7 +269,8 @@ def get_type_info_map():
name='associate_tag_doctor', name='associate_tag_doctor',
type='associate_tag_doctor', type='associate_tag_doctor',
model=agile_tag.AgileTagType, model=agile_tag.AgileTagType,
query_deferred=lambda: agile_tag.AgileTag.objects.all().query, query_deferred=lambda: agile_tag.AgileTag.objects.filter(AGILE_TAG_TYPE.DOCTOR,
AGILE_TAG_TYPE.UNDEFINED).query,
get_data_func=TagTransfer.get_tag_suggest_doctor_data_list, get_data_func=TagTransfer.get_tag_suggest_doctor_data_list,
bulk_insert_chunk_size=100, bulk_insert_chunk_size=100,
round_insert_chunk_size=5, round_insert_chunk_size=5,
...@@ -274,7 +280,8 @@ def get_type_info_map(): ...@@ -274,7 +280,8 @@ def get_type_info_map():
name='associate_tag_hospital', name='associate_tag_hospital',
type='associate_tag_hospital', type='associate_tag_hospital',
model=agile_tag.AgileTagType, model=agile_tag.AgileTagType,
query_deferred=lambda: agile_tag.AgileTag.objects.all().query, query_deferred=lambda: agile_tag.AgileTag.objects.filter(AGILE_TAG_TYPE.UNDEFINED,
AGILE_TAG_TYPE.HOSPITAL).query,
get_data_func=TagTransfer.get_tag_suggest_hospital_data_list, get_data_func=TagTransfer.get_tag_suggest_hospital_data_list,
bulk_insert_chunk_size=100, bulk_insert_chunk_size=100,
round_insert_chunk_size=5, round_insert_chunk_size=5,
...@@ -284,7 +291,8 @@ def get_type_info_map(): ...@@ -284,7 +291,8 @@ def get_type_info_map():
name='associate_tag_instrument', name='associate_tag_instrument',
type='associate_tag_instrument', type='associate_tag_instrument',
model=agile_tag.AgileTagType, model=agile_tag.AgileTagType,
query_deferred=lambda: agile_tag.AgileTag.objects.all().query, query_deferred=lambda: agile_tag.AgileTag.objects.filter(AGILE_TAG_TYPE.UNDEFINED,
AGILE_TAG_TYPE.INSTRUMENT).query,
get_data_func=TagTransfer.get_tag_suggest_instrument_data_list, get_data_func=TagTransfer.get_tag_suggest_instrument_data_list,
bulk_insert_chunk_size=100, bulk_insert_chunk_size=100,
round_insert_chunk_size=5, round_insert_chunk_size=5,
...@@ -294,7 +302,8 @@ def get_type_info_map(): ...@@ -294,7 +302,8 @@ def get_type_info_map():
name='associate_tag_position', name='associate_tag_position',
type='associate_tag_position', type='associate_tag_position',
model=agile_tag.AgileTagType, model=agile_tag.AgileTagType,
query_deferred=lambda: agile_tag.AgileTag.objects.all().query, query_deferred=lambda: agile_tag.AgileTag.objects.filter(AGILE_TAG_TYPE.UNDEFINED,
AGILE_TAG_TYPE.POSITION, ).query,
get_data_func=TagTransfer.get_tag_suggest_position_data_list, get_data_func=TagTransfer.get_tag_suggest_position_data_list,
bulk_insert_chunk_size=100, bulk_insert_chunk_size=100,
round_insert_chunk_size=5, round_insert_chunk_size=5,
...@@ -304,7 +313,8 @@ def get_type_info_map(): ...@@ -304,7 +313,8 @@ def get_type_info_map():
name='associate_tag_project', name='associate_tag_project',
type='associate_tag_project', type='associate_tag_project',
model=agile_tag.AgileTagType, model=agile_tag.AgileTagType,
query_deferred=lambda: agile_tag.AgileTag.objects.all().query, query_deferred=lambda: agile_tag.AgileTag.objects.filter(AGILE_TAG_TYPE.UNDEFINED,
AGILE_TAG_TYPE.PROJECT).query,
get_data_func=TagTransfer.get_tag_suggest_project_data_list, get_data_func=TagTransfer.get_tag_suggest_project_data_list,
bulk_insert_chunk_size=100, bulk_insert_chunk_size=100,
round_insert_chunk_size=5, round_insert_chunk_size=5,
......
...@@ -50,10 +50,7 @@ class TagTransfer(object): ...@@ -50,10 +50,7 @@ class TagTransfer(object):
item_dict["api_agile_tag_recommend_type"] = instance.get_api_agile_tag_recommend_type() item_dict["api_agile_tag_recommend_type"] = instance.get_api_agile_tag_recommend_type()
ret_list.append(item_dict) ret_list.append(item_dict)
suggest_list = get_tips_suggest_list(instance.name) suggest_list = get_tips_suggest_list(instance.name)
logging.info("get ret_list:%s" % ret_list) logging.info("get ret_list:%s" % ret_list)
logging.info("get suggest_list:%s" % ret_list)
return (item_dict, suggest_list) return (item_dict, suggest_list)
except: except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
...@@ -85,7 +82,6 @@ class TagTransfer(object): ...@@ -85,7 +82,6 @@ class TagTransfer(object):
logging.info("get ret_list:%s" % ret_list) logging.info("get ret_list:%s" % ret_list)
logging.info("get suggest_list:%s" % ret_list) logging.info("get suggest_list:%s" % ret_list)
return (item_dict, suggest_list) return (item_dict, suggest_list)
except: except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
...@@ -152,6 +148,8 @@ class TagTransfer(object): ...@@ -152,6 +148,8 @@ class TagTransfer(object):
logging.info("get ret_list:%s" % ret_list) logging.info("get ret_list:%s" % ret_list)
logging.info("get suggest_list:%s" % ret_list) logging.info("get suggest_list:%s" % ret_list)
logging.info("get ret_list:%s" % ret_list)
logging.info("get suggest_list:%s" % ret_list)
return (item_dict, suggest_list) return (item_dict, suggest_list)
except: except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
......
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