diff --git a/tabellio/pcfdb/sync.py b/tabellio/pcfdb/sync.py index b748e00..418ef7b 100644 --- a/tabellio/pcfdb/sync.py +++ b/tabellio/pcfdb/sync.py @@ -481,6 +481,11 @@ class SyncFromPcfDbView(BrowserView): notify(ObjectModifiedEvent(object)) self.publish(object) + if count % 100 == 0: + transaction.commit() + + + transaction.commit() previous_count = count # currently active deputies @@ -820,6 +825,9 @@ class SyncFromPcfDbView(BrowserView): else: self.unpublish(object) + # many things happened, commit + transaction.commit() + cursor.close() return count