Commit 88eec1e6 authored by litaolemo's avatar litaolemo

update

parent cfc1ffa6
......@@ -469,15 +469,18 @@ def task_main():
# 实例化数据判断规则 注意高优先级在前 低优先级在后
push_rule_class1 = push_rule(favorite_count_ni=200,comment_count_ni=200, time_range=10, level=4)
push_rule_class2 = push_rule(favorite_count_ni=200,comment_count_ni=50, time_range=10, level=3)
push_rule_class3 = push_rule(comment_count_ni=1, time_range=10, level=1)
rules_list = [
push_rule_class1,
push_rule_class2
push_rule_class2,
push_rule_class3
]
# 循环处理抓取数据,返回需要添加至后端的数据
for res_data in scan_from_redis(rules_list):
# 符合规则入库数据
try:
tractate_id = write_data_into_mysql(res_data)
# tractate_id = write_data_into_mysql(res_data)
tractate_id = "test"
print("line394",tractate_id,res_data)
if res_data["level"] >= 3 and tractate_id:
title_str = res_data["platform"] + "帖子内容审核"
......@@ -488,9 +491,12 @@ def task_main():
{content}
""".format(tractate_id=tractate_id, content=res_data["content"],level=res_data["level"],releaser=res_data["releaser"])
send_file_email("", "", email_group=["<liulingling@igengmei.com>", "<liujinhuan@igengmei.com>",
"‎<hongxu@igengmei.com>", "‎<yangjiayue@igengmei.com>",
"‎<zhangweiwei@igengmei.com>","‎<liuyiting@igengmei.com>","‎<cp-sunyinghe@igengmei.com>"], cc_group=["‎<duanyingrong@igengmei.com>","‎<litao@igengmei.com>"],
send_file_email("", "", email_group=[
"‎<litao@igengmei.com>"
# "<liulingling@igengmei.com>", "<liujinhuan@igengmei.com>",
# "‎<hongxu@igengmei.com>", "‎<yangjiayue@igengmei.com>",
# "‎<zhangweiwei@igengmei.com>","‎<liuyiting@igengmei.com>", "‎<cp-sunyinghe@igengmei.com>"]
], cc_group=["‎<duanyingrong@igengmei.com>","‎<litao@igengmei.com>"],
email_msg_body_str=body_str, title_str=title_str)
print("send to mysql")
except Exception as e:
......
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