Skip to content

Commit

Permalink
fix review (continue is consumer is None)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimastbk committed Jun 29, 2024
1 parent d153ca4 commit 5bf26b2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions aiokafka/coordinator/assignors/sticky/sticky_assignor.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,11 @@ def _perform_reassignments(
)
# the partition must have a current consumer
consumer = self.current_partition_consumer.get(partition)
assert (
consumer is not None
), f"Expected partition {partition!r} to be assigned to a consumer"
if consumer is None:
log.error(
"Expected partition %r to be assigned to a consumer", partition
)
continue

Check warning on line 564 in aiokafka/coordinator/assignors/sticky/sticky_assignor.py

View check run for this annotation

Codecov / codecov/patch

aiokafka/coordinator/assignors/sticky/sticky_assignor.py#L564

Added line #L564 was not covered by tests

if (
partition in self.previous_assignment
Expand Down

0 comments on commit 5bf26b2

Please sign in to comment.