From e3c93919b3da6bc73197086103777e24d6533705 Mon Sep 17 00:00:00 2001 From: Cristhian Garcia Date: Thu, 2 Nov 2023 14:23:24 -0500 Subject: [PATCH] fix: use async events router by default --- event_routing_backends/settings/common.py | 4 ++-- event_routing_backends/tests/test_settings.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/event_routing_backends/settings/common.py b/event_routing_backends/settings/common.py index 22fe40d4..153525f1 100644 --- a/event_routing_backends/settings/common.py +++ b/event_routing_backends/settings/common.py @@ -138,7 +138,7 @@ def plugin_settings(settings): ], 'backends': { 'xapi': { - 'ENGINE': 'event_routing_backends.backends.events_router.EventsRouter', + 'ENGINE': 'event_routing_backends.backends.async_events_router.AsyncEventsRouter', 'OPTIONS': { 'processors': [ { @@ -194,7 +194,7 @@ def plugin_settings(settings): ], "backends": { "caliper": { - "ENGINE": "event_routing_backends.backends.events_router.EventsRouter", + 'ENGINE': 'event_routing_backends.backends.async_events_router.AsyncEventsRouter', "OPTIONS": { "processors": [ { diff --git a/event_routing_backends/tests/test_settings.py b/event_routing_backends/tests/test_settings.py index 3137ef6b..95f1ef13 100644 --- a/event_routing_backends/tests/test_settings.py +++ b/event_routing_backends/tests/test_settings.py @@ -20,7 +20,8 @@ def test_common_settings(self): Test common settings """ common_settings.plugin_settings(settings) - self.assertIn('event_bus', settings.EVENT_TRACKING_BACKENDS) + self.assertIn('xapi', settings.EVENT_TRACKING_BACKENDS) + self.assertIn('caliper', settings.EVENT_TRACKING_BACKENDS) self.assertIn('edx.course.enrollment.activated', settings.EVENT_TRACKING_BACKENDS_BUSINESS_CRITICAL_EVENTS) self.assertFalse(settings.CALIPER_EVENTS_ENABLED) self.assertFalse(settings.CALIPER_EVENT_LOGGING_ENABLED) @@ -32,7 +33,8 @@ def test_devstack_settings(self): Test devstack settings """ devstack_settings.plugin_settings(settings) - self.assertIn('event_bus', settings.EVENT_TRACKING_BACKENDS) + self.assertIn('xapi', settings.EVENT_TRACKING_BACKENDS) + self.assertIn('caliper', settings.EVENT_TRACKING_BACKENDS) self.assertIn('edx.course.enrollment.deactivated', settings.EVENT_TRACKING_BACKENDS_BUSINESS_CRITICAL_EVENTS) self.assertFalse(settings.CALIPER_EVENTS_ENABLED) self.assertFalse(settings.CALIPER_EVENT_LOGGING_ENABLED)