better bulk update

This commit is contained in:
2022-06-07 10:32:50 -05:00
parent 49baa96bcc
commit 475ef1c7bf

View File

@@ -124,4 +124,5 @@ class WordleDb:
def bulk_update_scores(self, scores: typing.List[Score]):
with db.atomic():
Score.bulk_update(scores, fields=[Score.score], batch_size=50)
for score in scores:
score.save()