Skip to content

Commit

Permalink
fix: bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
woile committed Oct 9, 2024
1 parent 782e0cd commit 908f142
Show file tree
Hide file tree
Showing 4 changed files with 679 additions and 644 deletions.
2 changes: 1 addition & 1 deletion kstreams/prometheus/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def clean_stream_consumer_metrics(self, consumer: Consumer) -> None:
partition = topic_partition.partition

metrics_found = False
for sample in self.MET_LAG.collect()[0].samples:
for sample in list(self.MET_LAG.collect())[0].samples:
if {
"topic": topic,
"partition": str(partition),
Expand Down
7 changes: 7 additions & 0 deletions kstreams/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,13 @@ async def __anext__(self) -> ConsumerRecord:
except errors.ConsumerStoppedError:
raise StopAsyncIteration # noqa: F821

async def __call__(self, *args, **kwargs) -> typing.Any:
"""Make stream work as the wrapped func to keep behavior.
This allows for testing the stream as a normal function.
"""
return self.func(*args, **kwargs)


def stream(
topics: typing.Union[typing.List[str], str],
Expand Down
Loading

0 comments on commit 908f142

Please sign in to comment.