zadjii / nebula

The personal private cloud platform
http://starmap.io
MIT License
2 stars 1 forks source link

Handshake each remote only once #63

Open zadjii opened 6 years ago

zadjii commented 6 years ago
        # Part 1: Legacy
        # Handshake the remote for each mirror on this host.
        # This does not update our cert, or really our IP.
        # todo: In the future, have one Remote object in the host DB for each remote
        #   and handshake that remote once.
        # todo: And then update that Remote's handshake
        mirrored_clouds = db.session.query(Cloud).filter_by(completed_mirroring=True)
        all_mirrored_clouds = mirrored_clouds.all()
        for cloud in all_mirrored_clouds:
            self.send_remote_handshake(cloud)

We have one Remote model for each remote, but we still handshake on a per-cloud basis