MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / sync_down

Function sync_down

keepercommander/sync_down.py:27–44  ·  view source on GitHub ↗

Sync full or partial data down to the client

(params, record_types=False)

Source from the content-addressed store, hash-verified

25
26
27def sync_down(params, record_types=False): # type: (KeeperParams, bool) -> None
28 """Sync full or partial data down to the client"""
29
30 # Use spinner animation for full sync (only in interactive mode, not batch/automation).
31 # WARNING: stop() MUST be guaranteed via finally. A leaked spinner thread keeps
32 # '\r'-overwriting the current console row for the rest of the session, erasing
33 # lines of any large output printed later - notably base64 KSM config tokens
34 # (`pam project import` / `pam gateway new` access_token), which then reach the
35 # user silently corrupted.
36 spinner = None
37 if not params.sync_down_token and not params.batch_mode:
38 spinner = Spinner('Syncing...')
39 spinner.start()
40 try:
41 _sync_down_impl(params, record_types)
42 finally:
43 if spinner:
44 spinner.stop()
45
46
47def _sync_down_impl(params, record_types=False): # type: (KeeperParams, bool) -> None

Callers 10

update_recordFunction · 0.90
add_recordFunction · 0.90
delete_recordFunction · 0.90
_create_configMethod · 0.90
executeMethod · 0.90
test_sync_remove_teamMethod · 0.50

Calls 4

startMethod · 0.95
stopMethod · 0.95
_sync_down_implFunction · 0.85
SpinnerClass · 0.70