Skip to content

Commit

Permalink
fixup!: docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Rebecca Graber committed Oct 4, 2023
1 parent 815bdf5 commit c805931
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions openedx_events/event_bus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,18 @@ def _reset_state(sender, **kwargs): # pylint: disable=unused-argument


def merge_publisher_configs(publisher_config_a, publisher_config_b):
"""
Merge two EVENT_BUS_PRODUCER_CONFIG maps
Arguments:
publisher_config_a: An EVENT_BUS_PRODUCER_CONFIG-structured map
publisher_config_b: An EVENT_BUS_PRODUCER_CONFIG-structured map
Returns:
A new EVENT_BUS_PRODUCER_CONFIG map created by combining the two maps. All event_type/topic pairs in
publisher_config_b are added to the publisher_config_a. If there is a conflict on whether a particular
event_type/topic pair is enabled, publisher_config_b wins out.
"""
combined = {**publisher_config_a}
for event_type, event_type_config_b in publisher_config_b.items():
event_type_config_combined = combined.get(event_type, {})
Expand Down

0 comments on commit c805931

Please sign in to comment.