Skip to content

Commit

Permalink
fix: updated goal reminder email time logger (#36045)
Browse files Browse the repository at this point in the history
  • Loading branch information
AhtishamShahid authored Dec 18, 2024
1 parent 98214a5 commit e2a4b9e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Command to trigger sending reminder emails for learners to achieve their Course Goals
"""
import time
from datetime import date, datetime, timedelta
from eventtracking import tracker
import logging
Expand Down Expand Up @@ -119,9 +120,9 @@ def send_ace_message(goal, session_id):

with emulate_http_request(site, user):
try:
start_time = datetime.now()
start_time = time.perf_counter()
ace.send(msg)
end_time = datetime.now()
end_time = time.perf_counter()
log.info(f"Goal Reminder for {user.id} for course {goal.course_key} sent in {end_time - start_time} "
f"using {'SES' if is_ses_enabled else 'others'}")
except Exception as exc: # pylint: disable=broad-except
Expand Down

0 comments on commit e2a4b9e

Please sign in to comment.