Commit the changes every 50 blocks saved

This commit is contained in:
Novatux 2014-03-04 07:47:09 +01:00
parent edc92b9691
commit 4fb7717471

View File

@ -293,6 +293,7 @@ class MTMap:
for block in self.blocks:
if num_saved%50 == 0:
print("Saved", num_saved, "blocks")
conn.commit()
num_saved += 1
cur.execute("INSERT INTO blocks VALUES (?,?)",
(self.getBlockAsInteger(block.pos),