From 3b13b38ab85ad0d6031dccc41a7bb9795e1a0bc6 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Mon, 27 Mar 2017 23:15:30 -0300 Subject: [feature] add send_missing to cli - Related: #8807 --- client/src/leap/soledad/client/_blobs.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'client/src/leap/soledad') 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__': -- cgit v1.2.3