diff options
author | Victor Shyba <victor1984@riseup.net> | 2017-10-25 22:35:32 -0300 |
---|---|---|
committer | Victor Shyba <victor1984@riseup.net> | 2017-10-27 16:01:48 -0300 |
commit | 5faf22e4603d8130d11890f43f2f002821e8a976 (patch) | |
tree | 8e0a849b96d1540e4d2c695abb000eca3534a480 /src/leap/soledad/client/_db/blobs/sync.py | |
parent | 3230c9388729ae784c05575a2021c9d0995faa13 (diff) |
[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
Diffstat (limited to 'src/leap/soledad/client/_db/blobs/sync.py')
-rw-r--r-- | src/leap/soledad/client/_db/blobs/sync.py | 6 |
1 files changed, 3 insertions, 3 deletions
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) |