Support >= 2.9 query batching
Change-Id: I78e2f32d16c938153e58c1304575622351271b71
This commit is contained in:
parent
f21f085d20
commit
76ccd91ff9
@ -353,8 +353,11 @@ class SyncProjectTask(Task):
|
|||||||
for batch in responses:
|
for batch in responses:
|
||||||
changes += batch
|
changes += batch
|
||||||
if batch and '_more_changes' in batch[-1]:
|
if batch and '_more_changes' in batch[-1]:
|
||||||
sortkey = '&N=%s' % (batch[-1]['_sortkey'],)
|
|
||||||
done = False
|
done = False
|
||||||
|
if '_sortkey' in batch[-1]:
|
||||||
|
sortkey = '&N=%s' % (batch[-1]['_sortkey'],)
|
||||||
|
else:
|
||||||
|
sortkey = '&start=%s' % (len(batch))
|
||||||
change_ids = [c['id'] for c in changes]
|
change_ids = [c['id'] for c in changes]
|
||||||
with app.db.getSession() as session:
|
with app.db.getSession() as session:
|
||||||
# Winnow the list of IDs to only the ones in the local DB.
|
# Winnow the list of IDs to only the ones in the local DB.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user