add transaction commits in more places
This commit is contained in:
parent
a7a3672311
commit
5b28e05df4
|
@ -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
|
||||
|
||||
|
|
Reference in New Issue