Merge pull request #46 from cecini/enableV2scheduler

Enable  V2 scheduler
This commit is contained in:
Vikash Kothary 2020-11-15 20:49:58 +00:00 committed by GitHub
commit ce1e632fc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,8 +112,10 @@ class SyncCollectionHandler(Syncer):
# ankidesktop >=2.1rc2 sends graves in applyGraves, but still expects # ankidesktop >=2.1rc2 sends graves in applyGraves, but still expects
# server-side deletions to be returned by start # server-side deletions to be returned by start
def start(self, minUsn, lnewer, graves={"cards": [], "notes": [], "decks": []}, offset=None): def start(self, minUsn, lnewer, graves={"cards": [], "notes": [], "decks": []}, offset=None):
if offset is not None: # The offset para is passed by client V2 scheduler,which is minutes_west.
raise NotImplementedError('You are using the experimental V2 scheduler, which is not supported by the server.') # 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.maxUsn = self.col._usn
self.minUsn = minUsn self.minUsn = minUsn
self.lnewer = not lnewer self.lnewer = not lnewer