From 85ecad1aabed99b49e7def7afa98eee0f26fd4e5 Mon Sep 17 00:00:00 2001 From: Ahtisham Shahid Date: Tue, 7 Jan 2025 00:36:56 +0500 Subject: [PATCH] chore: added verification logs in edx.ace.message_sent event (#36074) --- lms/djangoapps/bulk_email/signals.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/bulk_email/signals.py b/lms/djangoapps/bulk_email/signals.py index fb8749bf45a9..8ada8760cdcf 100644 --- a/lms/djangoapps/bulk_email/signals.py +++ b/lms/djangoapps/bulk_email/signals.py @@ -1,6 +1,8 @@ """ Signal handlers for the bulk_email app """ +import logging + from django.dispatch import receiver from eventtracking import tracker @@ -10,6 +12,8 @@ from .models import Optout +log = logging.getLogger(__name__) + @receiver(USER_RETIRE_MAILINGS) def force_optout_all(sender, **kwargs): # lint-amnesty, pylint: disable=unused-argument @@ -43,7 +47,7 @@ def ace_email_sent_handler(sender, **kwargs): if not course_id: course_email = context.get('course_email', None) course_id = course_email.course_id if course_email else None - + log.info(f'Email sent for {message_name} for course {course_id} using channel {channel}') tracker.emit( 'edx.ace.message_sent', {