don't dirty cards/fact on full check, rely on lastSync = 0

This commit is contained in:
Damien Elmes 2009-06-11 03:49:16 +09:00
parent 3085ce7328
commit d2ac7fc13e

View file

@ -2299,7 +2299,7 @@ select id from fields where factId not in (select id from facts)""")
self.updateCardTags() self.updateCardTags()
# fix any priorities # fix any priorities
self.updateProgress(_("Updating priorities...")) self.updateProgress(_("Updating priorities..."))
self.updateAllPriorities() self.updateAllPriorities(dirty=False)
# fix problems with stripping html # fix problems with stripping html
self.updateProgress(_("Rebuilding QA cache...")) self.updateProgress(_("Rebuilding QA cache..."))
fields = self.s.all("select id, value from fields") fields = self.s.all("select id, value from fields")
@ -2311,12 +2311,8 @@ select id from fields where factId not in (select id from facts)""")
newFields) newFields)
# regenerate question/answer cache # regenerate question/answer cache
for m in self.models: for m in self.models:
self.updateCardsFromModel(m) self.updateCardsFromModel(m, dirty=False)
# mark everything changed to force sync # force a full sync
self.s.flush()
self.s.statement("update cards set modified = :t", t=time.time())
self.s.statement("update facts set modified = :t", t=time.time())
self.s.statement("update models set modified = :t", t=time.time())
self.lastSync = 0 self.lastSync = 0
# rebuild # rebuild
self.updateProgress(_("Rebuilding types...")) self.updateProgress(_("Rebuilding types..."))