Skip to content

Commit

Permalink
Merge pull request #1936 from dandi/fix-potential-race-conditon
Browse files Browse the repository at this point in the history
Fix race condition in sha256 calculation task
  • Loading branch information
mvandenburgh authored Jun 3, 2024
2 parents 94185a0 + d862e6d commit b09fde7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dandiapi/api/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ def calculate_sha256(blob_id: str) -> None:

# TODO: Run dandi-cli validation

asset_blob.sha256 = sha256
asset_blob.save()
AssetBlob.objects.filter(blob_id=blob_id).update(sha256=sha256)


@shared_task(soft_time_limit=180)
Expand Down

0 comments on commit b09fde7

Please sign in to comment.