auto commit on excess transactions
This commit is contained in:
parent
62979c8417
commit
16d13a3bd0
1 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ class Database:
|
|||
self.in_transaction = 0
|
||||
self.transaction_writes = 0
|
||||
self.testing_tables = []
|
||||
self.auto_commit_on_excess = 0
|
||||
self.auto_commit_on_many_writes = 0
|
||||
|
||||
self.password = self.get_db_password(self.user, password)
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ class Database:
|
|||
if self.in_transaction and query[:6].lower() in ['update', 'insert']:
|
||||
self.transaction_writes += 1
|
||||
if self.transaction_writes > 5000:
|
||||
if self.auto_commit_on_excess:
|
||||
if self.auto_commit_on_many_writes:
|
||||
webnotes.conn.commit()
|
||||
webnotes.conn.begin()
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue