moved callback registration to AFTER our instance updates ETCD
This commit is contained in:
parent
0a93abe30f
commit
70eb98da76
|
@ -62,14 +62,14 @@ class SyncthingMonitor:
|
|||
self.syncthing.disable_announce_discovery_and_relay()
|
||||
self.syncthing.sync_config()
|
||||
|
||||
print("Registering etcd update callback...", flush=True)
|
||||
self.etcd.register_device_update_handler(self.update_devices)
|
||||
|
||||
print("Attempting to add this device to etcd...", flush=True)
|
||||
self.etcd.add_device_to_cluster(self.my_device_id, self.syncthing_node_name, self.syncthing_publish_address)
|
||||
print("Added this device to cluster with publish address: {0}".format(self.syncthing_publish_address),
|
||||
flush=True)
|
||||
|
||||
print("Registering etcd update callback...", flush=True)
|
||||
self.etcd.register_device_update_handler(self.update_devices)
|
||||
|
||||
self.update_devices(None)
|
||||
|
||||
print("Entering loop...", flush=True)
|
||||
|
|
Loading…
Reference in New Issue
Block a user