print the total number of emails sent

This commit is contained in:
Andrej Karpathy 2021-12-04 00:39:55 -08:00
parent 6df5f1d178
commit 1153a70563

View File

@ -216,6 +216,7 @@ if __name__ == "__main__":
pdb = get_papers_db() pdb = get_papers_db()
# iterate all users, create recommendations, send emails # iterate all users, create recommendations, send emails
num_sent = 0
for user, tags in tags.items(): for user, tags in tags.items():
# verify that we have an email for this user # verify that we have an email for this user
@ -251,6 +252,9 @@ if __name__ == "__main__":
# actually send the email # actually send the email
print("sending email...") print("sending email...")
send_email(email, html) send_email(email, html)
num_sent += 1
print("done.") print("done.")
print("sent %d emails" % (num_sent, ))