summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-03-27 23:15:30 -0300
committerdrebs <drebs@leap.se>2017-04-19 11:37:05 +0200
commit3b13b38ab85ad0d6031dccc41a7bb9795e1a0bc6 (patch)
tree57fb130760c87e1dc3d686cb5c51f1cf5641d892
parent6da5ce6286336f5945e2eff5ceb0ae10116f8546 (diff)
[feature] add send_missing to cli
- Related: #8807
-rw-r--r--client/src/leap/soledad/client/_blobs.py13
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__':