Skip to content

Commit

Permalink
Add explanation in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mvandenburgh committed Jun 29, 2022
1 parent 1a4b547 commit a3cfaf4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dandiapi/api/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def calculate_sha256(blob_id: int) -> None:
asset_blob.save()

# The newly calculated sha256 digest will be included in the metadata, so we need to revalidate
# Note, we use `.iterator` here and delay each validation as a new task in order to keep memory
# usage down.
for asset in asset_blob.assets.values('id').iterator():
# Note: while asset metadata is fairly lightweight compute-wise, memory-wise it can become
# an issue during serialization/deserialization of the JSON blob by pydantic. Therefore,
Expand Down

0 comments on commit a3cfaf4

Please sign in to comment.