Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add sync command #63

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open

add sync command #63

wants to merge 2 commits into from

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