fix: adjust enterprise api

This commit is contained in:
GareArc
2025-04-09 16:30:41 -04:00
parent 5e50570739
commit e9a207b38e
11 changed files with 77 additions and 69 deletions

View File

@ -13,9 +13,7 @@ def send_enterprise_email_task(to, subject, body, substitutions):
if not mail.is_inited():
return
logging.info(
click.style("Start enterprise mail to {} with subject {}".format(to, subject), fg="green")
)
logging.info(click.style("Start enterprise mail to {} with subject {}".format(to, subject), fg="green"))
start_at = time.perf_counter()
try:
@ -29,9 +27,7 @@ def send_enterprise_email_task(to, subject, body, substitutions):
end_at = time.perf_counter()
logging.info(
click.style(
"Send enterprise mail to {} succeeded: latency: {}".format(to, end_at - start_at), fg="green"
)
click.style("Send enterprise mail to {} succeeded: latency: {}".format(to, end_at - start_at), fg="green")
)
except Exception:
logging.exception("Send enterprise mail to {} failed".format(to))