Damien Elmes 2020-02-18 11:00:26 +10:00
parent 8c80e46d80
commit ef7b0b1e82

View File

@ -668,7 +668,7 @@ did = ? and queue = {QUEUE_TYPE_DAY_LEARN_RELEARN} and due <= ? limit ?""",
if card.due < self.dayCutoff: if card.due < self.dayCutoff:
# add some randomness, up to 5 minutes or 25% # add some randomness, up to 5 minutes or 25%
maxExtra = min(300, int(delay * 0.25)) maxExtra = min(300, int(delay * 0.25))
fuzz = random.randrange(0, maxExtra) fuzz = random.randrange(0, max(1, maxExtra))
card.due = min(self.dayCutoff - 1, card.due + fuzz) card.due = min(self.dayCutoff - 1, card.due + fuzz)
card.queue = QUEUE_TYPE_LRN card.queue = QUEUE_TYPE_LRN
if card.due < (intTime() + self.col.conf["collapseTime"]): if card.due < (intTime() + self.col.conf["collapseTime"]):