better database commiting

This commit is contained in:
Ozbolt Menegatti 2019-08-21 11:08:08 +02:00
parent b25e3de76b
commit d497749c78

View File

@ -47,6 +47,7 @@ def main(args):
matches = match_file(words, structures)
match_store.add_matches(matches)
word_stats.add_words(words)
database.commit()
# force a bit of garbage collection
del words
@ -55,7 +56,6 @@ def main(args):
# if no output files, just exit
if all([x == None for x in [args.out, args.out_no_stat, args.all, args.stats]]):
database.commit()
return
# get word renders for lemma/msd