Commit ff7e64c8 authored by lixiaofang's avatar lixiaofang

add log

parent 3d3d2830
......@@ -162,13 +162,14 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
##根据转换后的分钟数进行比较
##转化成分数后进行一层一层的比较
if num_days == 0:
print("当天")
logging.info("-------------当天----------------------------")
get_time = randomDate(create_time=createt, action_type=action_type)
time_region = 0
return get_time, time_region
elif num_days >= 1 and num_days <= 6:
print("1-6天的")
logging.info("-------------1-6天的----------------------------")
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)
......@@ -176,7 +177,8 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
return get_time, time_region
elif num_days > 6 and num_days <= 365:
print("6天后的")
logging.info("-------------6天后的---------------------------")
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)
time_region = 2
......@@ -184,7 +186,7 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
else:
##需要删掉kafka的数据不再进行下发
print("所有下发结束")
logging.info("-------------所有下发结束---------------------------")
return [], 3
except:
......@@ -213,15 +215,13 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
##转化成分数后进行一层一层的比较
if num_days == 0:
print("当天")
logging.info("-------------当天----------------------------")
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:
print("1天的")
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)
......@@ -230,7 +230,6 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
return get_time, 1
elif num_days > 1 and num_days <= 15:
print("2-15天后的")
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)
......@@ -240,8 +239,6 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
elif num_days > 15 and num_days <= 365:
##需要删掉kafka的数据不再进行下发
print("15天后的")
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)
......@@ -250,7 +247,7 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
return get_time, 4
else:
print("所有下发结束")
logging.info("-------------所有下发结束---------------------------")
return [], 3
except:
......
......@@ -84,8 +84,8 @@ DATABASES = {
'NAME': 'mimas_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'mysql-service',
'PORT': '3306',
'HOST': 'bj-cdb-6slgqwlc.sql.tencentcdb.com',
'PORT': '62120',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情
......
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