Commit b86c40fb authored by lixiaofang's avatar lixiaofang

auto_vest

parent 4a882e01
......@@ -30,7 +30,7 @@ def click(card_info):
values = list(redis_data.values())
s = [True for i in values if i > 0]
if len(s) > 0:
send_email_tome(redis_data)
send_email_tome(str(redis_data) + str(card_info))
return True
except:
......
......@@ -31,7 +31,7 @@ def comment(card_info):
values = list(redis_data.values())
s = [True for i in values if i > 0]
if len(s) > 0:
send_email_tome(redis_data)
send_email_tome(str(redis_data) + str(card_info))
return True
except:
......
......@@ -29,7 +29,7 @@ def follow(card_info):
values = list(redis_data.values())
s = [True for i in values if i > 0]
if len(s) > 0:
send_email_tome(redis_data)
send_email_tome(str(redis_data) + str(card_info))
return True
except:
......
......@@ -26,7 +26,7 @@ def kafka_consum(topic_name=None):
consumser_obj.subscribe([topic_name, ])
try:
while True:
msg_dict = consumser_obj.poll(timeout_ms=100, max_records=50)
msg_dict = consumser_obj.poll(timeout_ms=100, max_records=30)
consumser_obj.commit_async()
for msg_key in msg_dict:
consume_msg = msg_dict[msg_key]
......
......@@ -7,7 +7,7 @@ from email.utils import formataddr
from django.conf import settings
my_sender = 'lixiaofang@igengmei.com'
my_pass = 'tg5AVKBB8jLQGBET'
my_pass = 'Wd3W9j5XDbcKQHiz'
my_user6 = "lixiaofang@igengmei.com"
......@@ -16,7 +16,7 @@ def send_email_tome(stat_data):
msg = MIMEText(stat_data, 'plain', 'utf-8')
msg['From'] = formataddr(["李小芳", my_sender])
msg["To"] = formataddr(["李小芳", my_user6])
msg['Subject'] = str(datetime.date.today()) + "马甲超过次数啦,赶紧看一下" + str(settings.SERVICE_NAME)
msg['Subject'] = str(datetime.date.today()) + "马甲超过次数啦,赶紧看一下"
server = smtplib.SMTP_SSL("smtp.exmail.qq.com", 465)
server.login(my_sender, my_pass)
server.sendmail(my_sender, [my_user6], msg.as_string())
......
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