2007-06-14 Don Allingham <don@gramps-project.org>
* src/GrampsDbUtils/_Backup.py (__do_restore): use transactions during restore svn: r8554
This commit is contained in:
parent
eb5135310f
commit
2caf3dd35a
@ -1,3 +1,6 @@
|
||||
2007-06-14 Don Allingham <don@gramps-project.org>
|
||||
* src/GrampsDbUtils/_Backup.py (__do_restore): use transactions during restore
|
||||
|
||||
2007-06-14 Brian Matherly <brian@gramps-project.org>
|
||||
* src/docgen/SvgDrawDoc.py: improve text rendering (#0001072)
|
||||
|
||||
|
@ -125,9 +125,19 @@ def __do_restore(database):
|
||||
try:
|
||||
while True:
|
||||
data = pickle.load(backup_table)
|
||||
tbl[data[0]] = data[1]
|
||||
if database.UseTXN:
|
||||
txn = database.env.txn_begin()
|
||||
else:
|
||||
txn = None
|
||||
tbl.put(data[0], data[1], txn=txn)
|
||||
if txn:
|
||||
txn.commit()
|
||||
except EOFError:
|
||||
if not database.UseTXN:
|
||||
tbl.sync()
|
||||
|
||||
backup_table.close()
|
||||
|
||||
database.rebuild_secondary()
|
||||
|
||||
def __build_tbl_map(database):
|
||||
|
Loading…
Reference in New Issue
Block a user