diff options
author | Victor Shyba <victor1984@riseup.net> | 2017-03-27 23:15:30 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2017-04-19 11:37:05 +0200 |
commit | 3b13b38ab85ad0d6031dccc41a7bb9795e1a0bc6 (patch) | |
tree | 57fb130760c87e1dc3d686cb5c51f1cf5641d892 /client | |
parent | 6da5ce6286336f5945e2eff5ceb0ae10116f8546 (diff) |
[feature] add send_missing to cli
- Related: #8807
Diffstat (limited to 'client')
-rw-r--r-- | client/src/leap/soledad/client/_blobs.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/client/src/leap/soledad/client/_blobs.py b/client/src/leap/soledad/client/_blobs.py index fac65383..14c9ffaa 100644 --- a/client/src/leap/soledad/client/_blobs.py +++ b/client/src/leap/soledad/client/_blobs.py @@ -394,6 +394,10 @@ def testit(reactor): parser_get = subparsers.add_parser( 'list', help='list local and remote blob ids') + # parse send_missing command + parser_get = subparsers.add_parser( + 'send_missing', help='send all pending upload blobs') + # parse arguments args = parser.parse_args() @@ -459,6 +463,13 @@ def testit(reactor): remote_list = yield manager.remote_list() logger.info(":: Remote list: %s" % remote_list) + @defer.inlineCallbacks + def _send_missing(): + logger.info(":: Sending local pending upload docs") + manager = _manager() + yield manager.send_missing() + logger.info(":: Finished sending missing docs") + if args.action == 'upload': yield _upload(args.blob_id, args.payload) elif args.action == 'download': @@ -469,6 +480,8 @@ def testit(reactor): yield _get(args.blob_id) elif args.action == 'list': yield _list() + elif args.action == 'send_missing': + yield _send_missing() if __name__ == '__main__': |