From 8448c6586d1acb19d1c7c2ced07332a98a92b416 Mon Sep 17 00:00:00 2001 From: cecini Date: Tue, 27 Oct 2020 11:30:20 +0800 Subject: [PATCH] Enable V2 scheduler --- src/ankisyncd/sync_app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ankisyncd/sync_app.py b/src/ankisyncd/sync_app.py index 732dac2..4372ac7 100644 --- a/src/ankisyncd/sync_app.py +++ b/src/ankisyncd/sync_app.py @@ -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