传递日期参数
This commit is contained in:
parent
8f0766e825
commit
ee47c16a73
@ -72,13 +72,16 @@ def send_dailyreport():
|
||||
data = rp.run()
|
||||
print(data)
|
||||
#data[day] = day
|
||||
msg.subject = f"{project}_{day}_数据"
|
||||
msg.html = render_template('report.html', data=data, day=day)
|
||||
if data:
|
||||
msg.subject = f"{project}_{day}_数据"
|
||||
msg.html = render_template('report.html', data=data, day=day)
|
||||
|
||||
thread = Thread(target=send_async_email, args=[app, msg])
|
||||
thread.start()
|
||||
thread = Thread(target=send_async_email, args=[app, msg])
|
||||
thread.start()
|
||||
|
||||
return jsonify("邮件发送成功")
|
||||
return jsonify("邮件发送成功")
|
||||
else:
|
||||
return jsonify("get Data Failed!")
|
||||
|
||||
|
||||
class Report:
|
||||
@ -303,8 +306,10 @@ class Report:
|
||||
def run(self):
|
||||
if self.project == 'mini_games':
|
||||
parms = [(1004, 6001), (1011, 6001), (1001, 6001)]
|
||||
else:
|
||||
elif self.project == '2001':
|
||||
parms = [(2001, 6001), (2002, 6001)]
|
||||
else:
|
||||
return None
|
||||
|
||||
cn = self.get_args_cn()
|
||||
if not cn:
|
||||
|
Loading…
x
Reference in New Issue
Block a user