Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions watson/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1534,9 +1534,10 @@ def config(context, key, value, edit):


@cli.command()
@click.option('-l', '--force-local', is_flag=True, help="Force local will overwrite server")
@click.pass_obj
@catch_watson_error
def sync(watson):
def sync(watson, force_local):
"""
Get the frames from the server and push the new ones.

Expand All @@ -1556,8 +1557,9 @@ def sync(watson):
Pushed 23 frames to the server
"""
last_pull = arrow.utcnow()
pulled = watson.pull()
click.secho(f'Received {pulled} frames from the server.', fg='green')
if not force_local:
pulled = watson.pull()
click.secho(f'Received {pulled} frames from the server.', fg='green')

pushed = watson.push(last_pull)
click.secho(f'Pushed {pushed} frames to the server.', fg='green')
Expand Down
Loading