Skip to content

Commit

Permalink
additional_data: rewrite_additional_data use bulk update api
Browse files Browse the repository at this point in the history
Attempt to speed up writing additional_data block.

Related: #130
  • Loading branch information
michaelwood committed Nov 30, 2022
1 parent 4e0f220 commit e198369
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ def handle(self, *args, **options):
for grant in grants:
additional_data = generator.create(grant.data)
grant.additional_data = additional_data
grant.save()

Grant.objects.bulk_update(grants, ["additional_data"], batch_size=10000)

0 comments on commit e198369

Please sign in to comment.