From f63e49b3016ea46e44547ad286dd9c7ed7f5de67 Mon Sep 17 00:00:00 2001 From: Rebecca Graber Date: Thu, 24 Aug 2023 09:05:26 -0400 Subject: [PATCH 1/4] feat: abstract out producer creation --- edx_arch_experiments/scripts/republish_failed_events.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/edx_arch_experiments/scripts/republish_failed_events.py b/edx_arch_experiments/scripts/republish_failed_events.py index eecf0e5..00be9fd 100644 --- a/edx_arch_experiments/scripts/republish_failed_events.py +++ b/edx_arch_experiments/scripts/republish_failed_events.py @@ -31,13 +31,14 @@ import click from edx_event_bus_kafka.internal.producer import create_producer from openedx_events.tooling import EventsMetadata, OpenEdxPublicSignal, load_all_signals +from openedx_events.event_bus import get_producer @click.command() @click.option('--filename', type=click.Path(exists=True)) def read_and_send_events(filename): load_all_signals() - producer = create_producer() + producer = get_producer() try: log_columns = ['initial_topic', 'event_type', 'event_data_as_json', 'event_key_field', 'event_metadata_as_json'] with open(filename) as log_file: From e062c51f3659092a8bd43e570478d668f517a667 Mon Sep 17 00:00:00 2001 From: Rebecca Graber Date: Thu, 24 Aug 2023 09:07:33 -0400 Subject: [PATCH 2/4] fixup!: rm unused import --- edx_arch_experiments/scripts/republish_failed_events.py | 1 - 1 file changed, 1 deletion(-) diff --git a/edx_arch_experiments/scripts/republish_failed_events.py b/edx_arch_experiments/scripts/republish_failed_events.py index 00be9fd..73bac97 100644 --- a/edx_arch_experiments/scripts/republish_failed_events.py +++ b/edx_arch_experiments/scripts/republish_failed_events.py @@ -29,7 +29,6 @@ from ast import literal_eval import click -from edx_event_bus_kafka.internal.producer import create_producer from openedx_events.tooling import EventsMetadata, OpenEdxPublicSignal, load_all_signals from openedx_events.event_bus import get_producer From d98893f968d544c4fa0216e3913a8703f812f4eb Mon Sep 17 00:00:00 2001 From: Rebecca Graber Date: Thu, 24 Aug 2023 09:09:31 -0400 Subject: [PATCH 3/4] fixup!: isort --- edx_arch_experiments/scripts/republish_failed_events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edx_arch_experiments/scripts/republish_failed_events.py b/edx_arch_experiments/scripts/republish_failed_events.py index 73bac97..e8cd004 100644 --- a/edx_arch_experiments/scripts/republish_failed_events.py +++ b/edx_arch_experiments/scripts/republish_failed_events.py @@ -29,8 +29,8 @@ from ast import literal_eval import click -from openedx_events.tooling import EventsMetadata, OpenEdxPublicSignal, load_all_signals from openedx_events.event_bus import get_producer +from openedx_events.tooling import EventsMetadata, OpenEdxPublicSignal, load_all_signals @click.command() From 5f2938381ce4cfc2a97b0129f8e8c8117ca5894e Mon Sep 17 00:00:00 2001 From: Rebecca Graber Date: Fri, 25 Aug 2023 09:06:26 -0400 Subject: [PATCH 4/4] fixup!: readme --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 4da7309..33cf226 100644 --- a/README.rst +++ b/README.rst @@ -4,13 +4,13 @@ edx-arch-experiments |pypi-badge| |ci-badge| |codecov-badge| |pyversions-badge| |license-badge| -A plugin to include applications under development by the architecture team at 2U. +A plugin to include applications under development by and useful utility scripts for the architecture team at 2U. Overview ------------------------ This plugin is meant to house experimental and in-development applications from the edX architecture team at 2U that are either not appropriate (i.e. 2U-specific) or not yet ready for community consumption. - +It also includes some one-off scripts meant to reduce toil for the team. Development Workflow --------------------