This repository has been archived by the owner on Mar 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move footer into lambda configuration.
- Loading branch information
1 parent
804a6a0
commit b078255
Showing
2 changed files
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
REPORT_EMAIL_FROM = '[email protected]' | ||
REPORT_MAILLIST = '[email protected]' | ||
|
||
def email_report(report_html, email_addr=REPORT_MAILLIST): | ||
def email_report(report_html, email_addr=REPORT_MAILLIST, footnotes=''): | ||
""" | ||
Send a Benchmark.AI report to an e-mail address | ||
TODO(vishaalk): Validate the e-mail address format. | ||
|
@@ -34,12 +34,14 @@ def email_report(report_html, email_addr=REPORT_MAILLIST): | |
---------- | ||
report_html : str | ||
the report formatted in HTML | ||
email_addr : string | ||
email_addr : str | ||
the e-mail address to send the report to | ||
footnotes : str | ||
any additional information to append to the information (e.g. non-public links). This should | ||
be formatted with HTML tags. | ||
""" | ||
|
||
EMAIL_FOOTNOTE = '<i>Note: Values are averaged over the last 7 days.</i>' | ||
html = "{}<br/><br/>{}".format(report_html, EMAIL_FOOTNOTE) | ||
html = "{}<br/><br/>{}".format(report_html, footnotes) | ||
logging.info("Sending e-mail report.") | ||
ses = boto3.client('ses') | ||
response = ses.send_email( | ||
|