lookit / lookit-api

Codebase for Lookit v2 and Experimenter v2. Includes an API. Docs: http://lookit.readthedocs.io/
https://lookit.mit.edu/
MIT License
10 stars 18 forks source link

Fix Video.DoesNotExist error when deleting videos from cloud #1433

Closed becky-gilbert closed 1 month ago

becky-gilbert commented 1 month ago

Fixes #1430

This PR fixes the Video.DoesNotExist error that we're getting in the celery delete_video_from_cloud task. The error is happening because the delete video task is running after the video object has been deleted, but then the code inside the task is trying to reference the deleted video object. The video object is being referenced in order to figure out which AWS bucket to delete the video from. So instead of looking for that information inside the task code, we can pass it in as an argument when the task is first set up.

Implementation notes:

Testing:

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud