Commit a588d1c0 authored by lixiaofang's avatar lixiaofang

add

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