From 5faf22e4603d8130d11890f43f2f002821e8a976 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 25 Oct 2017 22:35:32 -0300 Subject: [refactor] add a table for sync_status As defined in #8970, this table and the new module will ease adding sync features such as priority queues and streaming. --Resolves: #8970 --- src/leap/soledad/client/_db/blobs/sync.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/leap/soledad/client/_db/blobs/sync.py') diff --git a/src/leap/soledad/client/_db/blobs/sync.py b/src/leap/soledad/client/_db/blobs/sync.py index 67df1d7f..d2b7bed6 100644 --- a/src/leap/soledad/client/_db/blobs/sync.py +++ b/src/leap/soledad/client/_db/blobs/sync.py @@ -71,7 +71,8 @@ class BlobsSynchronizer(object): Optional parameter to restrict operation to a given namespace. :type namespace: str """ - missing = yield self.local.list(namespace, SyncStatus.PENDING_UPLOAD) + missing = yield self.local.list_status( + SyncStatus.PENDING_UPLOAD, namespace) total = len(missing) logger.info("Will send %d blobs to server." % total) deferreds = [] @@ -119,8 +120,7 @@ class BlobsSynchronizer(object): :type namespace: str """ # TODO: Use something to prioritize user requests over general new docs - d = self.local_list(namespace=namespace, - sync_status=SyncStatus.PENDING_DOWNLOAD) + d = self.local_list_status(SyncStatus.PENDING_DOWNLOAD, namespace) docs_we_want = yield d total = len(docs_we_want) logger.info("Will fetch %d blobs from server." % total) -- cgit v1.2.3