You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ADN-DMR-Peer-Server/src/adn_server/application/subscription/store_sync.py

17 lines
569 B

"""Keep ``SubscriptionStore`` aligned with legacy ``BRIDGES`` (read-only mirror; not routing authority yet)."""
from __future__ import annotations
from typing import Any
from adn_server.application.ports import SubscriptionStore
from adn_server.application.subscription.bridges_import import subscriptions_from_bridges
def replace_store_from_bridges(
store: SubscriptionStore,
bridges: dict[str, list[dict[str, Any]]],
) -> None:
"""Replace store contents from a full ``BRIDGES`` snapshot."""
store.replace_all(subscriptions_from_bridges(bridges))

Powered by TurnKey Linux.