Commit 5f40f1c5 authored by lixiaofang's avatar lixiaofang

auto_vest

parent 5cfa3e37
......@@ -56,13 +56,12 @@ def auto_comment_user(card_info, after_day=False):
card_info['all_follow_id']) == 0 and len(card_info['all_push_time']) == 0) or (
"all_follow_id" not in card_info and "all_push_time" not in card_info and card_info[
'type'] == "get_write_answer_userinfo"):
repeat_time = 1
while True:
if card_info['type'] == "get_write_answer_userinfo":
repeat_time = 0
card_info['have_comment_number'] = 0
get_time, time_region = get_content_time_by_create_time(create_time, content_level,
action_type="comment",
after_day=after_day,
......
......@@ -174,6 +174,8 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
action_type=action_type,
content_day_need_add_one_day=content_day_need_add_one_day)
time_region = 1
logging.info("get-----------------get_time:%s" % get_time)
return get_time, time_region
elif num_days > 6 and num_days <= 365:
......@@ -183,12 +185,13 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
content_day_need_add_one_day=content_day_need_add_one_day,
action_type=action_type, repeat_time=repeat_time)
time_region = 2
logging.info("get-----------------get_time:%s" % get_time)
return get_time, time_region
else:
##需要删掉kafka的数据不再进行下发
return [], 3
logging.info("get-----------------get_time:%s" % get_time)
except:
logger.error("catch exception,err_log:%s" % traceback.format_exc())
......@@ -214,6 +217,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
if num_days == 0:
get_time = randomDate(create_time=createt, action_type=action_type)
logging.info("get-----------------get_time:%s" % get_time)
return get_time, 0
elif num_days == 1:
......@@ -222,6 +227,7 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
get_time = get_one_six_days_random_time(num_days=num_days, action_type=action_type,
content_level=content_level,
content_day_need_add_one_day=content_day_need_add_one_day)
logging.info("get-----------------get_time:%s" % get_time)
return get_time, 1
......@@ -231,6 +237,7 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
get_time = get_one_six_days_random_time(num_days=num_days, action_type=action_type,
content_level=content_level,
content_day_need_add_one_day=content_day_need_add_one_day)
logging.info("get-----------------get_time:%s" % get_time)
return get_time, 2
......@@ -241,13 +248,12 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
get_time = get_ten_last_days_random_time(num_days=num_days, action_type=action_type,
content_level=content_level,
content_day_need_add_one_day=content_day_need_add_one_day)
logging.info("get-----------------get_time:%s" % get_time)
return get_time, 4
else:
return [], 3
logging.info("get-----------------get_time:%s" % get_time)
except:
logger.error("catch exception,err_log:%s" % traceback.format_exc())
return [], 5
......
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