Beispiel #1
0
def do_dns_service_refresh(ctx: ActorContext):
    DNS_SERVICE.refresh()
    records = {}
    for host, ip_set in DNS_SERVICE.records.items():
        records[host] = list(ip_set)
    msg = dict(records=records)
    expire_at = time.time() + 60 * 60
    for node in ctx.registery.remote_nodes:
        ctx.tell('actor.dns_service_update', msg, dst_node=node.name, expire_at=expire_at)
Beispiel #2
0
def test_dns_service_refresh():
    DNS_SERVICE.refresh()