Skip to content

Commit

Permalink
fix extra parameter (#101) (#109)
Browse files Browse the repository at this point in the history
* fix extra parameter in on_rebalance call (#101)
  • Loading branch information
bobh66 authored Feb 19, 2021
1 parent f541b5a commit d3f28bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion faust/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import typing
from typing import Any, Mapping, NamedTuple, Optional, Sequence, Tuple

__version__ = "0.5.1"
__version__ = "0.5.2"
__author__ = "Robinhood Markets, Inc."
__contact__ = "[email protected], [email protected]"
__homepage__ = "https://github.com/faust-streaming/faust"
Expand Down
4 changes: 1 addition & 3 deletions faust/tables/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,9 +568,7 @@ async def on_rebalance(
generation_id: int = 0,
) -> None:
"""Call when cluster is rebalancing."""
await self.data.on_rebalance(
self, assigned, revoked, newly_assigned, generation_id
)
await self.data.on_rebalance(assigned, revoked, newly_assigned, generation_id)

async def on_recovery_completed(
self, active_tps: Set[TP], standby_tps: Set[TP]
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/tables/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ async def test_on_rebalance(self, *, table):
generation_id = 1
await table.on_rebalance({TP1}, set(), set(), generation_id)
table._data.on_rebalance.assert_called_once_with(
table, {TP1}, set(), set(), generation_id
{TP1}, set(), set(), generation_id
)

@pytest.mark.asyncio
Expand Down

0 comments on commit d3f28bd

Please sign in to comment.