Commit c11c68b7 authored by lixiaofang's avatar lixiaofang

auto_vest

parent d077aa62
...@@ -77,7 +77,6 @@ def auto_click_user(card_info, after_day=False): ...@@ -77,7 +77,6 @@ def auto_click_user(card_info, after_day=False):
repeat_time += 1 repeat_time += 1
else: # 代表还有push好的时间没有下发完成 需要继续使用这些 else: # 代表还有push好的时间没有下发完成 需要继续使用这些
current_user_id = card_info["current_user_id"] current_user_id = card_info["current_user_id"]
card_info["all_follow_id"].remove(current_user_id) card_info["all_follow_id"].remove(current_user_id)
current_push_time = card_info['current_push_time'] current_push_time = card_info['current_push_time']
......
...@@ -207,6 +207,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action ...@@ -207,6 +207,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
num = (now - createt).total_seconds() num = (now - createt).total_seconds()
num_days = (now - createt).days num_days = (now - createt).days
content_day_need_add_one_day = False content_day_need_add_one_day = False
logging.info("get-----------------num_days:%s" % num_days)
if after_day: if after_day:
num_days += repeat_time num_days += repeat_time
content_day_need_add_one_day = True content_day_need_add_one_day = True
...@@ -216,6 +218,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action ...@@ -216,6 +218,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
return get_time, 0 return get_time, 0
elif num_days == 1: elif num_days == 1:
logging.info("get-----------------num_days:%s" % num_days)
get_time = get_one_six_days_random_time(num_days=num_days, action_type=action_type, get_time = get_one_six_days_random_time(num_days=num_days, action_type=action_type,
content_level=content_level, content_level=content_level,
content_day_need_add_one_day=content_day_need_add_one_day) content_day_need_add_one_day=content_day_need_add_one_day)
...@@ -223,6 +227,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action ...@@ -223,6 +227,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
return get_time, 1 return get_time, 1
elif num_days > 1 and num_days <= 15: elif num_days > 1 and num_days <= 15:
logging.info("get-----------------num_days:%s" % num_days)
get_time = get_one_six_days_random_time(num_days=num_days, action_type=action_type, get_time = get_one_six_days_random_time(num_days=num_days, action_type=action_type,
content_level=content_level, content_level=content_level,
content_day_need_add_one_day=content_day_need_add_one_day) content_day_need_add_one_day=content_day_need_add_one_day)
...@@ -231,6 +237,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action ...@@ -231,6 +237,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
elif num_days > 15 and num_days <= 365: elif num_days > 15 and num_days <= 365:
##需要删掉kafka的数据不再进行下发 ##需要删掉kafka的数据不再进行下发
logging.info("get-----------------num_days:%s" % num_days)
get_time = get_ten_last_days_random_time(num_days=num_days, action_type=action_type, get_time = get_ten_last_days_random_time(num_days=num_days, action_type=action_type,
content_level=content_level, content_level=content_level,
content_day_need_add_one_day=content_day_need_add_one_day) content_day_need_add_one_day=content_day_need_add_one_day)
...@@ -238,6 +246,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action ...@@ -238,6 +246,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
else: else:
return [], 3 return [], 3
logging.info("get-----------------get_time:%s" % get_time)
except: except:
logger.error("catch exception,err_log:%s" % traceback.format_exc()) logger.error("catch exception,err_log:%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