Commit a588d1c0 authored by lixiaofang's avatar lixiaofang

add

parent a583592c
......@@ -25,24 +25,25 @@ exec_count = 0
@shared_task
def write_to_es(es_type, pk_list, use_batch_query_set=False):
try:
pk_list = list(frozenset(pk_list))
if es_type == "register_user_tag":
RegisterUserTag.get_register_user_tag(pk_list)
elif es_type == "attention_user_tag":
RegisterUserTag.get_user_attention_tag(pk_list)
else:
type_info_map = get_type_info_map()
type_info = type_info_map[es_type]
logging.info("consume es_type:%s" % str(es_type))
type_info.insert_table_by_pk_list(
sub_index_name=es_type,
pk_list=pk_list,
use_batch_query_set=use_batch_query_set,
es=ESPerform.get_cli()
)
# pk_list = list(frozenset(pk_list))
#
# if es_type == "register_user_tag":
# RegisterUserTag.get_register_user_tag(pk_list)
# elif es_type == "attention_user_tag":
# RegisterUserTag.get_user_attention_tag(pk_list)
# else:
# type_info_map = get_type_info_map()
# type_info = type_info_map[es_type]
#
# logging.info("consume es_type:%s" % str(es_type))
# type_info.insert_table_by_pk_list(
# sub_index_name=es_type,
# pk_list=pk_list,
# use_batch_query_set=use_batch_query_set,
# es=ESPerform.get_cli()
# )
auto_click(pk_list)
auto_reply(pk_list)
except:
......@@ -180,7 +181,6 @@ def auto_reply(pk_list):
pc.close()
if topic_id_list:
try:
def fun_comment():
cookies = login()
if cookies:
......
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