Skip to content

Commit

Permalink
chore: update backends to single setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Apr 2, 2024
1 parent 9f959b0 commit 8f79594
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions event_routing_backends/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,18 +173,20 @@ def plugin_settings(settings):
'edx.course.grade.now_failed'
]

settings.EVENT_BUS_TRACKING_LOGS = set(allowed_xapi_events + allowed_caliper_events)
allowed_events = set(allowed_xapi_events + allowed_caliper_events)

settings.EVENT_BUS_TRACKING_LOGS = allowed_events

settings.EVENT_TRACKING_BACKENDS.update({
'xapi': {
'event_transformer': {
'ENGINE': 'eventtracking.backends.async_routing.AsyncRoutingBackend',
'OPTIONS': {
'backend_name': 'xapi',
'backend_name': 'events',
'processors': [
{
'ENGINE': 'eventtracking.processors.whitelist.NameWhitelistProcessor',
'OPTIONS': {
'whitelist': allowed_xapi_events
'whitelist': allowed_events
}
},
],
Expand All @@ -193,6 +195,12 @@ def plugin_settings(settings):
'ENGINE': 'event_routing_backends.backends.async_events_router.AsyncEventsRouter',
'OPTIONS': {
'processors': [
{
'ENGINE': 'eventtracking.processors.whitelist.NameWhitelistProcessor',
'OPTIONS': {
'whitelist': allowed_xapi_events
}
},
{
'ENGINE':
'event_routing_backends.processors.xapi.transformer_processor.XApiProcessor',
Expand All @@ -201,27 +209,17 @@ def plugin_settings(settings):
],
'backend_name': 'xapi',
}
}
},
},
},
"caliper": {
"ENGINE": "eventtracking.backends.async_routing.AsyncRoutingBackend",
"OPTIONS": {
"backend_name": "caliper",
"processors": [
{
"ENGINE": "eventtracking.processors.whitelist.NameWhitelistProcessor",
"OPTIONS": {
"whitelist": allowed_caliper_events
}
}
],
"backends": {
},
"caliper": {
'ENGINE': 'event_routing_backends.backends.async_events_router.AsyncEventsRouter',
"OPTIONS": {
"processors": [
{
"ENGINE": "eventtracking.processors.whitelist.NameWhitelistProcessor",
"OPTIONS": {
"whitelist": allowed_caliper_events
}
},
{
"ENGINE":
"event_routing_backends.processors."
Expand All @@ -240,7 +238,7 @@ def plugin_settings(settings):
"backend_name": "caliper"
}
}
}
}
}
},
},
},
})

0 comments on commit 8f79594

Please sign in to comment.