Skip to content

Commit

Permalink
fix: fix quality checks
Browse files Browse the repository at this point in the history
  • Loading branch information
UsamaSadiq committed Mar 21, 2024
1 parent 9de5ae5 commit 317443c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion edx_event_bus_kafka/internal/producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def send(
# would never get a delivery callback. That's why there's also a thread calling
# poll(0) on a regular interval (see `poll_indefinitely`).
self.producer.poll(0)
except Exception as e: # pylint: disable=broad-except
except Exception as e:
# Errors caused by the produce call should be handled by the on_delivery callback.
# Here we might expect serialization errors, or any errors from preparing to produce.
record_producing_error(e, context)
Expand Down
2 changes: 1 addition & 1 deletion edx_event_bus_kafka/management/commands/produce_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ def handle(self, *args, **options):
event_metadata=EventsMetadata(event_type=event_type),
)
producer.prepare_for_shutdown() # otherwise command may exit before delivery is complete
except Exception as e:
except Exception:

Check warning on line 67 in edx_event_bus_kafka/management/commands/produce_event.py

View check run for this annotation

Codecov / codecov/patch

edx_event_bus_kafka/management/commands/produce_event.py#L67

Added line #L67 was not covered by tests
logger.exception("Error producing Kafka event")

0 comments on commit 317443c

Please sign in to comment.