Commit 87b1e5b7 authored by lixiaofang's avatar lixiaofang

auto_vest

parent e0fd699b
......@@ -79,12 +79,7 @@ def auto_follow_user(card_info, after_day=False):
if time_region == 3:
break
repeat_time += 1
logging.info("get have_get_after__time:%s" % card_info)
else: # 代表还有push好的时间没有下发完成 需要继续使用这些
logging.info("get-----follow----card_info:%s" % card_info)
card_info["have_pust_num"] = card_info["have_pust_num"] + 1
current_user_id = card_info["current_user_id"]
card_info["all_follow_id"].remove(current_user_id)
......
......@@ -158,7 +158,6 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
num_days += repeat_time
content_day_need_add_one_day = True
logging.info("get-----------------num_days:%s" % num_days)
# 创建时间切换成分钟数便于比较
# mins = divmod(num, min)[0]
##根据转换后的分钟数进行比较
......@@ -169,25 +168,17 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
return get_time, time_region
elif num_days >= 1 and num_days <= 6:
logging.info("get-----------------num_days:%s" % num_days)
get_time = get_one_six_days_random_time(content_level=content_level, num_days=num_days,
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:
logging.info("get-----------------num_days:%s" % num_days)
get_time = get_ten_last_days_random_time(num_days=num_days, content_level=content_level,
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:
......@@ -210,46 +201,35 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
##获取创建时间和当前时间的相差秒数
num_days = (now - createt).days
content_day_need_add_one_day = False
logging.info("get-----------------num_days:%s" % num_days)
if after_day:
num_days += repeat_time
content_day_need_add_one_day = True
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:
logging.info("get-----------------num_days:%s" % num_days)
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
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,
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
elif num_days > 15 and num_days <= 365:
##需要删掉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,
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
......
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