Skip to content

add sync command#63

Open
chrismerck wants to merge 2 commits intotrunkfrom
feat/cmd-sync
Open

add sync command#63
chrismerck wants to merge 2 commits intotrunkfrom
feat/cmd-sync

Conversation

@chrismerck
Copy link
Collaborator

$ python -m bond sync -h
usage: bond sync [-h] [--verbose] [--full] [--print]

options:
  -h, --help  show this help message and exit
  --verbose   Print out all the details of the sync
  --full      Re-sync everything, not just the delta
  --print     Print out the shadow after syncing

Supports incremental update using hash tree:

$ python -m bond sync --verbose
GET ...
GET devices...
GET devices/1...
GET devices/1/skeds...  new:ddf10dc2175096f3  del:f71ba149d50f6ec0
GET devices/1/skeds/ddf10dc2175096f3...

@chrismerck
Copy link
Collaborator Author

Currently doesn't have any use within bond-cli, but I see some things we could build here.

I've added the ability to do bond sync --all --full which would throw away shadows for offline Bonds, useful when switching to another home network. Just --all will do hash-based update for all Bonds in parallel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant