From d88fa76d525eec098e1de4c14383c2ff67bc7721 Mon Sep 17 00:00:00 2001 From: Ahtisham Shahid Date: Thu, 12 Dec 2024 13:25:47 +0500 Subject: [PATCH] chore: added logs for goal reminder email (#35958) --- .../course_goals/management/commands/goal_reminder_email.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lms/djangoapps/course_goals/management/commands/goal_reminder_email.py b/lms/djangoapps/course_goals/management/commands/goal_reminder_email.py index b49d79976c06..eea03bd79455 100644 --- a/lms/djangoapps/course_goals/management/commands/goal_reminder_email.py +++ b/lms/djangoapps/course_goals/management/commands/goal_reminder_email.py @@ -119,7 +119,11 @@ def send_ace_message(goal, session_id): with emulate_http_request(site, user): try: + start_time = datetime.now() ace.send(msg) + end_time = datetime.now() + 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 log.error(f"Goal Reminder for {user.id} for course {goal.course_key} could not send: {exc}") tracker.emit(