Skip to content

Commit

Permalink
Merge pull request #166 from icgood/swim
Browse files Browse the repository at this point in the history
Support swim-protocol 0.6.0
  • Loading branch information
icgood authored Aug 13, 2023
2 parents f510760 + 7c31d07 commit 281fd12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions pymap/cluster/swim.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,13 @@ async def _start(self, args: Namespace, stack: AsyncExitStack) -> None:
_log.debug('SWIM configuration: %r %r',
config.local_name, config.peers)

transport = transport_type(config)
members = Members(config)
worker = Worker(config, members)
transport = transport_type(config, worker)
cluster_metadata.get().listen(self._local_update, members)
stack.enter_context(members.listener.on_notify(self._remote_update))
await stack.enter_async_context(transport.enter(worker))
task = asyncio.create_task(worker.run())
stack.callback(task.cancel)
await stack.enter_async_context(transport)
await stack.enter_async_context(
members.listener.on_notify(self._remote_update))

async def start(self, stack: AsyncExitStack) -> None:
args = self.config.args
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ admin = ['pymap-admin ~= 0.12.0']
macaroon = ['pymacaroons ~= 0.13.0']
redis = ['redis ~= 4.2', 'msgpack ~= 1.0']
sieve = ['sievelib ~= 1.2']
swim = ['swim-protocol ~= 0.5.0']
swim = ['swim-protocol ~= 0.6.0']
systemd = ['systemd-python']
optional = ['hiredis', 'passlib ~= 1.7', 'pid ~= 3.0']

Expand Down

0 comments on commit 281fd12

Please sign in to comment.