Commit 78d16ff4 authored by lixiaofang's avatar lixiaofang

修改bug

parent 6a3afab3
...@@ -56,10 +56,9 @@ def auto_comment_user(card_info, after_day=False): ...@@ -56,10 +56,9 @@ def auto_comment_user(card_info, after_day=False):
card_info['all_follow_id']) == 0 and len(card_info['all_push_time']) == 0) or ( 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[ "all_follow_id" not in card_info and "all_push_time" not in card_info and card_info[
'type'] == "get_write_answer_userinfo"): 'type'] == "get_write_answer_userinfo"):
repeat_time = 1
while True: while True:
repeat_time = 1
if card_info['type'] == "get_write_answer_userinfo": if card_info['type'] == "get_write_answer_userinfo":
repeat_time = 0 repeat_time = 0
card_info['have_comment_number'] = 0 card_info['have_comment_number'] = 0
......
...@@ -92,7 +92,7 @@ def get_one_six_days_random_time(frmt='%Y-%m-%d %H:%M:%S', num_days=0, action_ty ...@@ -92,7 +92,7 @@ def get_one_six_days_random_time(frmt='%Y-%m-%d %H:%M:%S', num_days=0, action_ty
def get_ten_last_days_random_time(num_days=None, frmt='%Y-%m-%d %H:%M:%S', content_level=0, def get_ten_last_days_random_time(num_days=None, frmt='%Y-%m-%d %H:%M:%S', content_level=0,
content_day_need_add_one_day=False, action_type=None): content_day_need_add_one_day=False, action_type=None, repeat_time=1):
try: try:
if num_days == None: if num_days == None:
...@@ -127,8 +127,8 @@ def get_ten_last_days_random_time(num_days=None, frmt='%Y-%m-%d %H:%M:%S', conte ...@@ -127,8 +127,8 @@ def get_ten_last_days_random_time(num_days=None, frmt='%Y-%m-%d %H:%M:%S', conte
pass pass
if content_day_need_add_one_day == True: if content_day_need_add_one_day == True:
start_time = zeroday + datetime.timedelta(days=add_number + 1) start_time = zeroday + datetime.timedelta(days=add_number * repeat_time)
end_time = lastday + datetime.timedelta(days=add_number + 1) end_time = lastday + datetime.timedelta(days=add_number * repeat_time)
else: else:
start_time = zeroday + datetime.timedelta(days=add_number) start_time = zeroday + datetime.timedelta(days=add_number)
...@@ -181,7 +181,7 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type ...@@ -181,7 +181,7 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
get_time = get_ten_last_days_random_time(num_days=num_days, content_level=content_level, 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, content_day_need_add_one_day=content_day_need_add_one_day,
action_type=action_type) action_type=action_type, repeat_time=repeat_time)
time_region = 2 time_region = 2
return get_time, time_region return get_time, time_region
......
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