Enable V2 scheduler

This commit is contained in:
cecini 2020-10-27 11:30:20 +08:00
parent f5dca1f1e2
commit 8448c6586d

View File

@ -112,8 +112,10 @@ class SyncCollectionHandler(Syncer):
# ankidesktop >=2.1rc2 sends graves in applyGraves, but still expects
# server-side deletions to be returned by start
def start(self, minUsn, lnewer, graves={"cards": [], "notes": [], "decks": []}, offset=None):
if offset is not None:
raise NotImplementedError('You are using the experimental V2 scheduler, which is not supported by the server.')
# The offset para is passed by client V2 scheduler,which is minutes_west.
# Since now have not thorougly test the V2 scheduler, we leave this comments here, and
# just enable the V2 scheduler in the serve code.
self.maxUsn = self.col._usn
self.minUsn = minUsn
self.lnewer = not lnewer