From a631a05a268fd375c462392a73c4266a8d9bb2d0 Mon Sep 17 00:00:00 2001 From: Justin Hynes Date: Tue, 6 Jun 2023 17:57:30 +0000 Subject: [PATCH] fix: update name of topic used to publish `CERTIFICATE_CREATED` events [APER-2347] This PR updates the name of the topic we are publishing our `CERTIFICATE_CREATED` events to. We had put a very generic name when writing the publishing code (and this was way before the actual topic was created). Now that the Confluent configuration is ready we need to update the name in our publishing code. --- lms/djangoapps/certificates/signals.py | 2 +- lms/djangoapps/certificates/tests/test_signals.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/certificates/signals.py b/lms/djangoapps/certificates/signals.py index 76dcd11863..676c10fb9c 100644 --- a/lms/djangoapps/certificates/signals.py +++ b/lms/djangoapps/certificates/signals.py @@ -169,7 +169,7 @@ def listen_for_certificate_created_event(sender, signal, **kwargs): if SEND_CERTIFICATE_CREATED_SIGNAL.is_enabled(): get_producer().send( signal=CERTIFICATE_CREATED, - topic='certificates', + topic='learning-certificate-lifecycle', event_key_field='certificate.course.course_key', event_data={'certificate': kwargs['certificate']}, event_metadata=kwargs['metadata'] diff --git a/lms/djangoapps/certificates/tests/test_signals.py b/lms/djangoapps/certificates/tests/test_signals.py index 90c888e2f2..b5993eb623 100644 --- a/lms/djangoapps/certificates/tests/test_signals.py +++ b/lms/djangoapps/certificates/tests/test_signals.py @@ -513,5 +513,5 @@ class CertificateEventBusTests(ModuleStoreTestCase): data = mock_producer.return_value.send.call_args.kwargs assert data['signal'].event_type == CERTIFICATE_CREATED.event_type assert data['event_data']['certificate'] == expected_certificate_data - assert data['topic'] == 'certificates' + assert data['topic'] == 'learning-certificate-lifecycle' assert data['event_key_field'] == 'certificate.course.course_key'